home *** CD-ROM | disk | FTP | other *** search
/ USA Bestseller / USA BESTSELLER Vol 1-95 (Hepp-Computer)(1995).iso / e032 / cimage.doc < prev    next >
Text File  |  1993-07-28  |  127KB  |  4,779 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.                               The Complete Image v3.11
  17.  
  18.                            Copyright 1993, Paul D. Nettle
  19.  
  20.  
  21.                                  _______
  22.                             ____|__     |                (R)
  23.                          --|       |    |-------------------
  24.                            |   ____|__  |  Association of
  25.                            |  |       |_|  Shareware
  26.                            |__|   o   |    Professionals
  27.                          -----|   |   |---------------------
  28.                               |___|___|    MEMBER
  29.  
  30.  
  31.                            Document dated:  July 28, 1993
  32.  
  33.                                    Paul D. Nettle
  34.                                  9668 Washington St.
  35.                                   Romulus, MI 48174
  36.                                    (313) 941-9223
  37.  
  38.                                    Author's name:  Paul D. Nettle
  39.                           Author's Compuserve ID:  72163,2442
  40.  
  41.                   This document also Copyright 1993, Paul D. Nettle
  42.  
  43.             A limited license is granted to reprint short extracts  from
  44.             this document  as  long as  credit  is given  to  the  above
  45.             mentioned party.   Individuals,  BBSs  and User  Groups  may
  46.             distribute copies of this  software, it's documentation  and
  47.             associated files  (originally  distributed  in  an  archive)
  48.             freely as long as the files remain in-tact, unmodified,  are
  49.             not re-named  and are  not made  part  of some  larger  work
  50.             without the written permission of Paul D. Nettle.  A BBS may
  51.             rearchive the unmodified archived file's contents as long as
  52.             the  resulting  archive  is  named  CIMAGE.ZIP,  CIMAGE.ARC,
  53.             CIMAGE.LZH or CIMAGE.???
  54.  
  55.  
  56.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  57.  
  58.  
  59.                                   TABLE OF CONTENTS
  60.  
  61.             Introduction .............................................4
  62.             Ombudsman Statement ......................................5
  63.             Definition of Shareware ..................................5
  64.             Disclaimer - Agreement ...................................6
  65.             Getting Started ..........................................7
  66.             Running CImage for the first time ........................8
  67.             Configuring CImage .......................................11
  68.                  Batch files .........................................11
  69.                  The startup batch file ..............................11
  70.                  Macros ..............................................11
  71.                  Environment variables ...............................12
  72.                  The CImage command line .............................12
  73.                  External programs interface .........................12
  74.                  Help file configuration .............................12
  75.                       Help File Format ...............................12
  76.                  Filter file configuration ...........................13
  77.                  Filter File Format ..................................13
  78.                  Getting CImage to work with your video card .........13
  79.                  Memory configuration ................................14
  80.             Batch Files ..............................................15
  81.             IPI File Format ..........................................17
  82.             Virtual Memory ...........................................18
  83.             Command Reference ........................................20
  84.                  ` (Left single quote) ...............................21
  85.                  : (Colon) ...........................................22
  86.                  ADD .................................................23
  87.                  ASK .................................................24
  88.                  BIN .................................................25
  89.                  BIOSINFO ............................................26
  90.                  BRIGHTEN ............................................27
  91.                  CONV ................................................28
  92.                  CPY .................................................30
  93.                  CRES ................................................31
  94.                  DARKEN ..............................................32
  95.                  DIVIDE ..............................................33
  96.                  ECHO ................................................34
  97.                  EXIT ................................................35
  98.                  FADE ................................................36
  99.                  FILL ................................................37
  100.                  FILTERFILE ..........................................38
  101.                  FLIP ................................................39
  102.                  FREE ................................................40
  103.                  GAMMA ...............................................41
  104.                  GAMV ................................................42
  105.                  GOTO ................................................43
  106.                  GREYSCALE ...........................................44
  107.                  IF ..................................................45
  108.                  LB ..................................................46
  109.                  LC ..................................................47
  110.                  LOAD ................................................48
  111.                  MACRO ...............................................49
  112.                  MEM .................................................51
  113.  
  114.  
  115.                                        Page 2
  116.  
  117.  
  118.  
  119.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  120.  
  121.  
  122.                  MERGE ...............................................52
  123.                  MULTIPLY ............................................53
  124.                  NEGATE ..............................................54
  125.                  NOISE ...............................................55
  126.                  NORMALIZE ...........................................56
  127.                  OVERLAY .............................................57
  128.                  PAUSE ...............................................58
  129.                  PERCENT .............................................59
  130.                  PIX .................................................60
  131.                  PLASMA ..............................................61
  132.                  PMOD ................................................62
  133.                  REM .................................................63
  134.                  SAVE ................................................64
  135.                  SET .................................................65
  136.                  SHOW ................................................66
  137.                  SUBTRACT ............................................67
  138.                  TERRAIN .............................................68
  139.                  VCOLORS .............................................69
  140.                  VESAINFO ............................................70
  141.                  VMODE ...............................................72
  142.             Future Enhancements ......................................74
  143.             Contacting Customer Support ..............................75
  144.             Ordering Information .....................................76
  145.                  What you will get when you register .................76
  146.                  Differences between non-registered and registered
  147.                  users ...............................................76
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.                                        Page 3
  179.  
  180.  
  181.  
  182.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  183.  
  184.  
  185.                                     INTRODUCTION
  186.  
  187.  
  188.             Thank you for choosing  "The Complete Image."   I hope  that
  189.             this product will be as useful for you as it was fun for  me
  190.             to write.  I'll try to keep this document from being dry, so
  191.             forgive me if the jokes get bad.
  192.  
  193.             To use  CImage,  you  will  be  expected  to  have  a  basic
  194.             understanding of DOS.  Having  a basic understanding of  DOS
  195.             batch  files  and   environment  variables   will  help   in
  196.             understanding CImage equivalents.
  197.  
  198.             CImage also requires at least a 386.  A math co-processor is
  199.             optional, but recommended.  2MB  of memory is also  required
  200.             (although 4 is better, and any more is just great).
  201.  
  202.             From now on "The  Complete Image" will  be known as  CImage.
  203.             (I like to pronounce it "simage").
  204.  
  205.             CImage is a full-featured image processor.  Take a look:
  206.  
  207.                  o  Reads and writes GIF, IMG, TGA, BMP and IPI image
  208.                     files.
  209.  
  210.                  o  An interface for external programs to perform tasks
  211.                     that CImage doesn't already perform via the IPI
  212.                     file format -- explained later in this document.
  213.  
  214.                  o  Very extensive on-line help.  The help file is a
  215.                     simple ASCII text file so that you may modify it to
  216.                     add your external programs, batch files, macros and
  217.                     whatever else you may want information on.
  218.  
  219.                  o  Batch files, Macros, Environment variables
  220.                     (separate from DOS's) that allow complete
  221.                     customization of CImage.
  222.  
  223.                  o  Image arithmetic functions (adding, subtracting,
  224.                     multiplying and dividing images).
  225.  
  226.                  o  Filters, filters filters... Count them up, and you
  227.                     have over 100 filters!  The filters are defined in
  228.                     an ASCII text file, so you can add your own.
  229.  
  230.                  o  Works on ALL video cards.  VESA compatibility with
  231.                     versions up to 1.2 VBE.  You have the choice of the
  232.                     built-in 256 color drivers, VESA, or BIOS.
  233.  
  234.                  o  Memory.  CImage uses ALL available memory by
  235.                     running in protected mode.  If you need more
  236.                     memory, you can turn on the Virtual Memory.
  237.  
  238.             I hope you enjoy using CIMAGE!
  239.  
  240.  
  241.                                        Page 4
  242.  
  243.  
  244.  
  245.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  246.  
  247.  
  248.             OMBUDSMAN STATEMENT
  249.  
  250.             This program is produced by a member of the Association of
  251.             Shareware Professionals (ASP).  ASP wants to make sure that
  252.             the Shareware principle works for you. If you are unable to
  253.             resolve a Shareware-related problem with an ASP member by
  254.             contacting the member directly, ASP may be able to help. The
  255.             ASP Ombudsman can help you resolve a dispute or problem with
  256.             an ASP member, but does not provide technical support for
  257.             members' products.  Please write to the ASP Ombudsman at 545
  258.             Grover Road, Muskegon, MI 49442-9427 USA, FAX 616-788-2765
  259.             or send a Compuserve message via CompuServe Mail to ASP
  260.             Ombudsman 70007,3536.
  261.  
  262.             DEFINITION OF SHAREWARE
  263.  
  264.             Shareware distribution gives users a chance to try  software
  265.             before buying  it.  If  you  try  a  Shareware  program  and
  266.             continue using it, you are expected to register.  Individual
  267.             programs differ  on  details --  some  request  registration
  268.             while others  require  it,  some  specify  a  maximum  trial
  269.             period. With registration, you get anything from the  simple
  270.             right to continue using the  software to an updated  program
  271.             with printed manual.
  272.  
  273.             Copyright  laws  apply  to  both  Shareware  and  commercial
  274.             software, and the copyright holder retains all rights,  with
  275.             a few specific exceptions as stated below. Shareware authors
  276.             are accomplished programmers, just like commercial  authors,
  277.             and the programs are of comparable quality. (In both  cases,
  278.             there are good programs and  bad ones!) The main  difference
  279.             is in the  method of distribution.  The author  specifically
  280.             grants the right to copy and distribute the software, either
  281.             to all and sundry or to a specific group. For example,  some
  282.             authors require written permission before a commercial  disk
  283.             vendor may copy their Shareware.
  284.  
  285.             Shareware is a distribution method, not a type of  software.
  286.             You  should  find  software   that  suits  your  needs   and
  287.             pocketbook,  whether  it's  commercial  or  Shareware.   The
  288.             Shareware system makes  fitting your  needs easier,  because
  289.             you can try  before you buy.   And because  the overhead  is
  290.             low, prices are low also. Shareware has the ultimate  money-
  291.             back guarantee -- if  you don't use  the product, you  don't
  292.             pay for it.
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.                                        Page 5
  305.  
  306.  
  307.  
  308.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  309.  
  310.  
  311.             DISCLAIMER - AGREEMENT
  312.  
  313.             Users of The Complete Image  must accept this disclaimer  of
  314.             warranty:   "The Complete  Image is  supplied  as is.    The
  315.             author  disclaims  all  warranties,  expressed  or  implied,
  316.             including,   without   limitation,    the   warranties    of
  317.             merchantability and of fitness  for any purpose. The  author
  318.             assumes no liability for  damages, direct or  consequential,
  319.             which may result from the use of The Complete Image."
  320.  
  321.             The Complete Image is a "Shareware program" and is  provided
  322.             at no charge to the user for evaluation.  Feel free to share
  323.             it with your friends, but please do not give it away altered
  324.             or as  part  of  another system.    The  essence  of  "user-
  325.             supported" software is  to provide  personal computer  users
  326.             with quality  software  without  high  prices,  and  yet  to
  327.             provide incentive for programmers to continue to develop new
  328.             products.  If you find this program useful and find that you
  329.             are using  The  Complete  Image  and  continue  to  use  The
  330.             Complete Image  after a  reasonable trial  period, you  must
  331.             make a registration payment of 35.00 to Paul D. Nettle.  The
  332.             35.00 registration fee will license one copy for use on  any
  333.             one computer at any one time.  You must treat this  software
  334.             just like a book.  An  example is that this software may  be
  335.             used by any number  of people and may  be freely moved  from
  336.             one computer location  to another, so  long as  there is  no
  337.             possibility of  it being  used at  one location  while  it's
  338.             being used at another.  Just as a book cannot be read by two
  339.             different persons at the same time.
  340.  
  341.             Commercial users of The Complete Image must register and pay
  342.             for their copies  of The Complete  Image within  30 days  of
  343.             first use  or  their  license is  withdrawn.    Site-License
  344.             arrangements may be made by contacting Paul D. Nettle.
  345.  
  346.             Anyone distributing  The  Complete  Image for  any  kind  of
  347.             remuneration must  first  contact  Paul  D.  Nettle  at  the
  348.             address above for authorization.  This authorization will be
  349.             automatically granted  to  distributors  recognized  by  the
  350.             (ASP)  as   adhering  to   its  guidelines   for   Shareware
  351.             distributors, and such distributors  may begin offering  The
  352.             Complete Image  immediately  (However Paul  D.  Nettle  must
  353.             still be advised so that the distributor can be kept  up-to-
  354.             date with the latest version of The Complete Image.).
  355.  
  356.             You are  encouraged to  pass a  copy of  The Complete  Image
  357.             along to your friends for evaluation.  Please encourage them
  358.             to register their copy  if they find that  they can use  it.
  359.             All registered  users  will receive  a  copy of  the  latest
  360.             version of The Complete Image system.
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.                                        Page 6
  368.  
  369.  
  370.  
  371.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  372.  
  373.  
  374.  
  375.                                    GETTING STARTED
  376.  
  377.  
  378.             CImage is ready to run.  All you have to do is install it.
  379.  
  380.             Installation is simple.   Since  you've probably  downloaded
  381.             the CImage archive and un-archived  it (which you needed  to
  382.             do to be reading this document) you're already set to go.
  383.  
  384.             To run  CImage,  you  need  to  have  both,  CIMAGE.EXE  and
  385.             DOS4GW.EXE in your path or in the current directory when you
  386.             run it.  To run it, just type CIMAGE.
  387.  
  388.             If you're like me, you may  already have a very large  path,
  389.             and wish not  to make  it larger.   Where there  is a  will,
  390.             there is a way!  Simply create a batch file that runs CImage
  391.             in the following way:
  392.  
  393.             C:\CIMAGE\DOS4GW C:\CIMAGE\CIMAGE %1 %2 %3 %4 %5 %6 %7 %8 %9
  394.  
  395.             This batch file runs DOS/4GW from the CIMAGE directory,  and
  396.             tells it to run CIMAGE from the same directory.  If you just
  397.             run CIMAGE, then it will not find the DOS Extender (which is
  398.             what it tries to do if you  just run CIMAGE).  So, you  need
  399.             to run the DOS Extender manually.
  400.  
  401.             This works  great because  CImage will  look for  all  batch
  402.             files and  the  filter  files in  the  directory  where  the
  403.             CIMAGE.EXE file is  located (if they  aren't first found  in
  404.             the current directory).
  405.  
  406.             Just place  that  batch file  someplace  in your  path,  and
  407.             you're all set to go!
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.                                        Page 7
  431.  
  432.  
  433.  
  434.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  435.  
  436.  
  437.                           RUNNING CIMAGE FOR THE FIRST TIME
  438.  
  439.             Run CImage by typing CIMAGE (or whatever you named the batch
  440.             file you  may  have created  as  explained in  the  previous
  441.             section).  Note  that if you  run out of  memory during  the
  442.             following examples, you will  need to enable Virtual  Memory
  443.             (see the section  titled VIRTUAL  MEMORY).   If your  system
  444.             only has 4MB, I suggest that  you do this now.  CImage  does
  445.             require a lot of memory.
  446.  
  447.             You will see your DOS prompt.   Notice the small  underscore
  448.             to the  left of  your prompt;  this  is called  the  "Prompt
  449.             modifier".  That's so you know  you're running CIMAGE.   You
  450.             can change it with the PMOD command.
  451.  
  452.             Try loading the Demo image that is included by typing:
  453.                  LOAD DEMO.IPI
  454.  
  455.             As soon  as you  pressed return,  CImage began  loading  the
  456.             image into  the  first available  buffer  (number 0  --  the
  457.             second buffer is number 1, and so on), showing you a percent
  458.             complete as it loads.  Sometimes the percents may not  quite
  459.             reach %100.  This  is just a simple  side effect of  integer
  460.             math.  Don't worry, if you got a prompt again, then you have
  461.             completely loaded  the  image.   Typing  LB  will  list  the
  462.             buffers in  use, and  DEMO.IPI should  be included  in  this
  463.             list.  If  not, you should  have received  an error  message
  464.             during the load.
  465.  
  466.             Next, show it by typing:
  467.                  SHOW
  468.  
  469.             Since the  SHOW  command  has  an  optional  parameter  (for
  470.             specifying which buffer to show) which  was left out in  the
  471.             above example, the SHOW command just shows the first  buffer
  472.             it runs across.
  473.  
  474.             When the image is completely displayed, you'll hear a  short
  475.             beep.  That beep is to  remind you that pressing a key  will
  476.             take you  back to  the command  prompt.   When  you're  done
  477.             trying to find this VERY DIM image, press a key.
  478.  
  479.             This demo image is  VERY dim...so dim  that you monitor  may
  480.             not even be  able to display  it (even  with the  brightness
  481.             turned all the way up!).  The colors are there, though,  and
  482.             I can  prove  it  to  you.   This  image  needs  a  contrast
  483.             enhancement.    So,  we   use  the  normalization   command:
  484.             NORMALIZE.  Try typing:
  485.  
  486.                  HELP NORMALIZE
  487.  
  488.             You should  have  received  a  screen  full  of  information
  489.             specific to the  NORMALIZE command.   Notice at the  bottom,
  490.             there is a SHORTCUT heading.  This means that by typing NORM
  491.  
  492.  
  493.                                        Page 8
  494.  
  495.  
  496.  
  497.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  498.  
  499.  
  500.             alone (rather  than  NORMALIZE)  you can  perform  the  same
  501.             function.  Try it:
  502.  
  503.                  NORM 0
  504.  
  505.             The Normalization  command  will  place the  output  of  the
  506.             normalization into  the  input  buffer unless  you  tell  it
  507.             otherwise (see NORM).  Once the NORM command has  completed,
  508.             you can  show  it  again (the  result  has  overwritten  the
  509.             original image  located in  buffer 0,  so, again,  we  still
  510.             don't need to tell show where to find our image):
  511.  
  512.                  SHOW
  513.  
  514.             Now, isn't that  better?  CImage  didn't create any  colors.
  515.             Those color were all present in that dim image, CImage  just
  516.             enhanced it for you.
  517.  
  518.             Image processing plays a bigger  role in everyday life  than
  519.             you may think.   Did you  know that when  an X-ray is  taken
  520.             using 1/4 the normal power (radiation), that the X-Ray comes
  521.             out looking black,  but that  all the  information is  still
  522.             present?  Just  like that  demo image  you just  normalized.
  523.             Some doctors will  actually take  your X-Ray  at 1/4  power,
  524.             then digitize the X-Ray so that they can perform a  contrast
  525.             Normalization on it to view it.   This way, you are  exposed
  526.             to fewer rays of  radiation, and you  can feel better  about
  527.             your health!
  528.  
  529.             Back to the  tour.   Before we  do anything  to this  image,
  530.             let's save it.   You can  save the contents  of buffer 0  by
  531.             typing:
  532.  
  533.                  SAVE 0 PICTURE.IPI
  534.  
  535.             You can use another file format  if you want.  To specify  a
  536.             different file  format, just  change  the extension  on  the
  537.             filename to TGA, GIF, BMP or IMG.
  538.  
  539.             Lets try a filter:
  540.  
  541.                  CONV LAPLAS3 0
  542.  
  543.             This causes  CImage  to  run  a  convolution  filter  called
  544.             "LAPLAS3" (located in the CIMAGE.FLT file) on our buffer.
  545.  
  546.             There are two  buffers in  memory now.   To  see the  second
  547.             buffer (buffer 1) use the following command:
  548.                  SHOW 1
  549.  
  550.             To see how much  memory you have  available, just type  MEM.
  551.             It lists the largest available memory block, and how much of
  552.             that memory  is virtual,  or, disk-based  memory  (explained
  553.             later).
  554.  
  555.  
  556.                                        Page 9
  557.  
  558.  
  559.  
  560.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  561.  
  562.  
  563.  
  564.             To free up all buffers, just type:
  565.                  FREE ALL
  566.  
  567.             This will release the buffers from memory.  If you have 4MB,
  568.             8MB or more, you won't need to  do this very often.  By  the
  569.             way, exiting CImage will automatically free all buffers.
  570.  
  571.             To quit CImage, just type:
  572.                  EXIT
  573.  
  574.             A shortcut for this  command is Q.   A lot of commands  have
  575.             shortcuts, don't forget to check out the help file for these
  576.             shortcuts.
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.                                        Page 10
  620.  
  621.  
  622.  
  623.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  624.  
  625.  
  626.                                  CONFIGURING CIMAGE
  627.  
  628.  
  629.             CImage is very configurable.  This section will explain  how
  630.             to configure CImage for your needs.
  631.  
  632.             Batch files:
  633.                  As I'm sure you already know,  batch files are a  great
  634.                  tool in DOS.  The same goes for CImage.
  635.  
  636.                  When you create batch files for CImage that you  always
  637.                  want available, place them  in the same directory  that
  638.                  you placed the CIMAGE.EXE  file.  When  you try to  run
  639.                  the batch  file,  if  it isn't  found  in  the  current
  640.                  directory, then CImage  looks for it  in the  directory
  641.                  where CImage was run from.   If you place a batch  file
  642.                  of the  same name  in the  current directory,  it  will
  643.                  override the one located in the CImage directory.   You
  644.                  may find this useful.
  645.  
  646.                  During  Startup,  CImage  will   attempt  to  run   the
  647.                  AUTOEXEC.IPB  file  (following   the  same  rules   for
  648.                  locating this file as all other batch files.)
  649.  
  650.             The startup batch file:
  651.                  As mentioned  above, CImage  will  attempt to  run  the
  652.                  AUTOEXEC.IPB batch file when it  starts.  This file  is
  653.                  no different than any other batch file.  Here's a  list
  654.                  of good suggestions to place in your AUTOEXEC.IPB file:
  655.  
  656.                       VMODE        - Set your preferred video mode.
  657.                       VESAINFO     - Configure the video features to use
  658.                                      VESA (if available).
  659.                       BIOSINFO     - Configure the video features to use
  660.                                      the BIOS.
  661.                       CRES         - Set the color resolution for your
  662.                                      video mode.
  663.                       VCOLORS      - Set the number of colors of your
  664.                                      non-standard video mode.
  665.                       PERCENT      - Turn the percentage displays
  666.                                      On/Off.
  667.                       GAMV         - Set the Gamma value of your choice.
  668.                       MACRO        - Set up any shortcut macros.
  669.                       SET          - Configure your environment
  670.                                      variables for image directories and
  671.                                      such.
  672.                       FILTERFILE   - Change the name of the Filter file
  673.                                      (default is CIMAGE.FLT)
  674.  
  675.                  For information on any of the above mentioned commands,
  676.                  just look them up in this document.
  677.  
  678.             Macros:
  679.  
  680.  
  681.  
  682.                                        Page 11
  683.  
  684.  
  685.  
  686.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  687.  
  688.  
  689.                  Macros are a great way to  shortcut a lot of  commands.
  690.                  They allow you to "type" complicated command line tasks
  691.                  with a single keystroke or with a single word.
  692.  
  693.             Environment variables:
  694.                  Environment variables are  great for specifying  paths,
  695.                  batch file  locations,  and  more.    They  are  really
  696.                  intended for  use  in  batch  files  only,  but  you're
  697.                  welcome to use them on  the command line, however,  you
  698.                  may find them to be rather cryptic to type.
  699.  
  700.             The CImage command line:
  701.                  The  CIMAGE.EXE  command  line   accepts  up  to   nine
  702.                  parameters.  These parameters are passed directly  into
  703.                  your AUTOEXEC.IPB.
  704.  
  705.                  You may use this for different startup configurations.
  706.  
  707.             External programs interface:
  708.                  The .IPI file  format was designed  to be the  simplest
  709.                  file format  available  for storing  24-bit  images  of
  710.                  unlimited resolutions.  This is  for those of you  that
  711.                  can program, and would like to add functions to  CImage
  712.                  that it doesn't  already perform.   Here is an  example
  713.                  batch file that takes advantage of this feature:
  714.  
  715.                     SAVE %1 TEMP.IPI
  716.                     FREE %1
  717.                     MYPROG TEMP.IPI
  718.                     LOAD TEMP.IPI %1
  719.                     DEL TEMP.IPI
  720.  
  721.                  This batch file will accept a single parameter for  the
  722.                  buffer  number.    This  buffer  is  then  saved  to  a
  723.                  temporary IPI file.   We will  free the  memory it  was
  724.                  using just  in case  we need  to give  MYPROG.EXE  some
  725.                  memory.  Next, CImage runs MYPROG.EXE from DOS, passing
  726.                  it TEMP.IPI as a parameter.  MYPROG.EXE can do whatever
  727.                  it wants to TEMP.IPI, then when it's done, CImage  will
  728.                  regain control.  Once we're back, we re-LOAD the image,
  729.                  then delete the temporary file.
  730.  
  731.                  If this batch file is  placed in the CImage  directory,
  732.                  then this function is available just as if it was built
  733.                  into CImage!
  734.  
  735.             Help file configuration:
  736.                  The CIMAGE.HLP  file is  a simple  ASCII file  full  of
  737.                  "topics" that are available on-line.  If you decide  to
  738.                  add external programs,  macros, or  whatever else,  you
  739.                  can add these as topics to  the help file.  The  format
  740.                  is quite simple:
  741.  
  742.                  Help File Format:
  743.  
  744.  
  745.                                        Page 12
  746.  
  747.  
  748.  
  749.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  750.  
  751.  
  752.                       1.  If the first non-space character on a line  is
  753.                           a semicolon,  then that  line is  ignored ("a
  754.                           comment").
  755.  
  756.                       2.  Topics  must begin with  a :  (colon) and  the
  757.                           colon must be placed in very  first column on
  758.                           the line.  No spaces may  be contained in the
  759.                           topic, and it must be followed by a new-line.
  760.                           (":DEMO" -- this is called a  "tag") will get
  761.                           help for  the  topic  "DEMO".    CImage  will
  762.                           display all  information after  the specified
  763.                           topic's tag until the next tag is found.
  764.  
  765.             Filter file configuration:
  766.                  CImage has many filters (the most I've ever seen in one
  767.                  place.)  The filters are defined in the file CIMAGE.FLT
  768.                  (or  whatever  you  may   have  renamed  it  with   the
  769.                  FILTERFILE command).  You may  modify this file as  you
  770.                  wish, adding or removing filters  (not that there is  a
  771.                  reason for  removing them)  at  your discretion.    The
  772.                  format is quite simple:
  773.  
  774.                  Filter File Format:
  775.                       1.  If the first non-space character on a line  is
  776.                           a semicolon,  then that  line is  ignored ("a
  777.                           comment").
  778.  
  779.                       2.  Filters are defined in the following way:
  780.  
  781.                       FILTER <filtername> <size>
  782.                       <upper-left>  <upper-center>  <upper-right>
  783.                       <center-left> <center-center> <center-right>
  784.                       <lower-left>  <lower-center>  <lower-right>
  785.                       <operator> <operand> <bias>
  786.  
  787.                       Where <filtername>  is  the name  of  the  filter.
  788.                       This is  where CONV  looks  for the  command  line
  789.                       option <filter>.  <size> is the size of the filter
  790.                       (3, 5 or 7 only, others are ignored).  For 5x5 and
  791.                       7x7 filters,  the  above  example  is  incomplete,
  792.                       since from <upper-left> to <lower-right> would  be
  793.                       a 5x5 or 7x7 "grid".
  794.  
  795.             Getting CImage to work with your video card:
  796.                  You have many options for getting CImage to work with
  797.                  your video card.  Just use the VMODE command to set the
  798.                  type of video interface you want to use.
  799.  
  800.                  First, try VESA.  It's the fastest, and allows more
  801.                  than 256 colors, if your card can handle it.  See the
  802.                  VESAINFO command for more information.
  803.  
  804.                  Example:
  805.                     VMODE VESA
  806.  
  807.  
  808.                                        Page 13
  809.  
  810.  
  811.  
  812.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  813.  
  814.  
  815.                     VESAINFO 101
  816.  
  817.                  If you don't have VESA capabilities, then you will
  818.                  probably want to use the built-in super-VGA drivers.
  819.                  See the VMODE command for more information on
  820.                  configuring the video mode.
  821.  
  822.                  Example:
  823.                     VMODE 13
  824.  
  825.                  If you have a really weird video card, then you may
  826.                  have to use the BIOS setting.  See the BIOSINFO command
  827.                  for more information on configuring the BIOS setting.
  828.  
  829.                  Example:
  830.                     VMODE BIOS
  831.                     BIOSINFO 0x5F 640 480
  832.  
  833.                  You may also need to set the CRES or VCOLORS to your
  834.                  video card's specified settings.
  835.  
  836.             Memory configuration:
  837.  
  838.                  CImage uses  the  DOS/4GW DOS  Extender  from  Rational
  839.                  Systems.   This DOS  Extender places  CImage into  "386
  840.                  Flat Model"  protected mode  where the  80386  executes
  841.                  instructions faster, and has  access to LOTS of  larger
  842.                  chunks of memory.  With access  to all of this  memory,
  843.                  CImage can  run faster,  and perform  more  complicated
  844.                  tasks than it  would if it  were written for  a 286  or
  845.                  less processor.
  846.  
  847.                  Lets assume you have 8 MEG.  CImage loads above the
  848.                  first MEG (this is where most systems keep their faster
  849.                  memory).  As memory is needed, CImage gets it from the
  850.                  memory above that first MEG.  If that runs out, then
  851.                  CImage starts looking for memory in the DOS 640K area.
  852.                  DOS's memory is used last because it is usually slower,
  853.                  and also because CImage can run DOS programs, so you
  854.                  will want to save as much DOS memory as possible.
  855.                  Virtual Memory (VMM) is also available (see VIRTUAL
  856.                  MEMORY).
  857.  
  858.                  Note that programs that use Extended or Expanded memory
  859.                  (like Disk Cache programs) will take memory away from
  860.                  CImage.  You may want to limit the memory that they use
  861.                  to allow a comfortable amount for both.
  862.  
  863.  
  864.  
  865.  
  866.  
  867.  
  868.  
  869.  
  870.  
  871.                                        Page 14
  872.  
  873.  
  874.  
  875.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  876.  
  877.  
  878.                                      BATCH FILES
  879.  
  880.             DESCRIPTION:
  881.                  Batch files are used for  running a series of  commands
  882.                  in a specific order saving  you the trouble of  running
  883.                  them manually; just  as if the  user were  to type  the
  884.                  commands at the command line.
  885.  
  886.                  If you are  familiar with DOS  batch programming,  then
  887.                  you will have  no problem adjusting  to CImage's  batch
  888.                  programming,  since   CImage   uses  the   exact   same
  889.                  techniques as DOS with the following exceptions:
  890.  
  891.                      1. Currently,  CImage  does  not  support  the  FOR
  892.                          command
  893.                      2. There  is  an  ASK command  that  DOS  does  not
  894.                          support.  See the ASK command for more help.
  895.                      3. Currently, ERRORLEVEL  is only  valid after  the
  896.                          ASK command.  Return  codes  from DOS  are  not
  897.                          available in CImage,  and CImage does  not need
  898.                          return codes for it's commands.
  899.                      4. CImage's  batch files  are named  with the  .IPB
  900.                          file extension rather  than the  .BAT extension
  901.                          used by DOS.
  902.                      5. Batch  files  must  be located  in  the  current
  903.                          directory, CImage does not search the path.  If
  904.                          the .IPB file is  still not found,  then CImage
  905.                          will search for the .IPB file  in the directory
  906.                          in which CImage was originally run.
  907.  
  908.                  As in DOS, there are nine  batch parameters (%1 -  %9).
  909.                  These are used for interpreting parameters passed  into
  910.                  the batch file  when it is  run. for example,  consider
  911.                  the batch file (called LOADSHOW.IPB):
  912.  
  913.                     LOAD %1 %2
  914.  
  915.                     SHOW %2
  916.  
  917.                  When LOADSHOW is run:
  918.  
  919.                     LOADSHOW PICTURE.GIF 0
  920.  
  921.                  will interpret as the following:
  922.  
  923.                     LOAD PICTURE.GIF 0
  924.                     SHOW 0
  925.  
  926.             NOTES:
  927.                  At startup CImage will  execute the AUTOEXEC.IPB  batch
  928.                  file.  Parameters may  be passed into the  AUTOEXEC.IPB
  929.                  file  when  CImage  is  run.    For  example,   "CImage
  930.                  PICTURE.GIF" will run "AUTOEXEC PICTURE.GIF".  This  is
  931.  
  932.  
  933.  
  934.                                        Page 15
  935.  
  936.  
  937.  
  938.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  939.  
  940.  
  941.                  useful  for  running   different  configurations,   for
  942.                  example.
  943.  
  944.                  The only place in CImage where the break key makes  any
  945.                  difference is in batch  files.  When  the break key  is
  946.                  pressed, the  current command  will not  stop, it  will
  947.                  finish, but when CImage goes to the batch file to  find
  948.                  the next command, it  will then ask  to exit the  batch
  949.                  file or to continue running it.
  950.  
  951.             SEE ALSO:
  952.                  ASK IF GOTO : REM PAUSE ECHO
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.                                        Page 16
  998.  
  999.  
  1000.  
  1001.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1002.  
  1003.  
  1004.                                    IPI FILE FORMAT
  1005.  
  1006.             DESCRIPTION:
  1007.                  The IPI  (pronounced "ipee")  file  format is  used  to
  1008.                  store 24-bit images. This format was designed to be the
  1009.                  simplest to decode for programmers so that they may add
  1010.                  functionality to CImage via external programs.
  1011.  
  1012.                  For example:    A  developer needs  to  use  CImage  to
  1013.                  manipulate some images for his software's title screen.
  1014.                  Assume  the  interface   programs  have  already   been
  1015.                  written.  He runs CImage, and  from CImage he runs  his
  1016.                  program to generate  an image, and  save it  to an  IPI
  1017.                  file.  Now he tells CImage  to load the file, and  does
  1018.                  whatever manipulation he  needs done.   Next, he  saves
  1019.                  the file  in IPI  format.   Lastly, he  runs his  other
  1020.                  interface program to load the  IPI file, do some  final
  1021.                  changes or modifications,  then he saves  the image  in
  1022.                  his own file format.
  1023.  
  1024.                  With the  use  of  batch files,  this  process  can  be
  1025.                  automated.  His second interface program can even erase
  1026.                  the IPI file when it's no  longer needed, so as not  to
  1027.                  clutter up the hard drive.
  1028.  
  1029.                  This prevents the  developer from having  to write  any
  1030.                  GIF encoding or decoding  routines, or having to  learn
  1031.                  an image format that is more complicated than he  would
  1032.                  like.   The IPI  files  are un-compressed,  linear  RGB
  1033.                  format with  a very  small header.   These  files  were
  1034.                  meant to be temporary, so they can be rather large.   A
  1035.                  640x480 image can be over 900K in size.
  1036.  
  1037.                  The IPI format is as follows:
  1038.                     X resolution (WORD - MSB first)
  1039.                     Y resolution (WORD - MSB first)
  1040.                     Image data:
  1041.                        FOR EACH PIXEL IN THE SCREEN (XRES * YRES)
  1042.                        {
  1043.                           Red Element   (BYTE)
  1044.                           Green Element (BYTE)
  1045.                           Blue Element  (BYTE)
  1046.                        }
  1047.  
  1048.             SEE ALSO:
  1049.                  LOAD SAVE MERGE LB
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.                                        Page 17
  1061.  
  1062.  
  1063.  
  1064.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1065.  
  1066.  
  1067.                                    VIRTUAL MEMORY
  1068.  
  1069.             DESCRIPTION:
  1070.                  CImage was written with the Watcom C/C++32 9.5 and uses
  1071.                  the DOS/4GW DOS Extender  from Rational Systems.   This
  1072.                  royalty-free DOS Extender (DOS4GW.EXE) offers a Virtual
  1073.                  Memory Manager (VMM).  When CImage runs out of  memory,
  1074.                  it can be  configured so that  it automatically  starts
  1075.                  swapping to disk.   In this way,  you can actually  use
  1076.                  more RAM than your computer has!
  1077.  
  1078.                  This configuration  MUST take  place before  CImage  is
  1079.                  run.  If CImage runs out  of memory while running,  you
  1080.                  must  save  what  your  are  doing,  exit  CImage   and
  1081.                  configure for VMM before re-starting CImage.
  1082.  
  1083.                  To enable VMM, you only need  to set a single  environ-
  1084.                  ment variable.   Might  I suggest  that you  create  an
  1085.                  CIMAGE.BAT batch file  that sets  this variable  before
  1086.                  running CImage, then clears it afterwards just in  case
  1087.                  you're  not  one  for  having  all  these   environment
  1088.                  variable hanging  around  when they  aren't  (like  me)
  1089.                  necessary.
  1090.  
  1091.                  I have found a drawback to using the VMM.  It tends  to
  1092.                  slows CImage down dramatically, even when not  swapping
  1093.                  to disk.
  1094.  
  1095.                  To enable VMM with default values, just "SET DOS4GVM=1"
  1096.                  from within  DOS before  entering  CImage.   It's  that
  1097.                  simple.  But, like all other things, there is a way  to
  1098.                  complicate it  by configuring  it (it's  not that  bad,
  1099.                  actually).
  1100.  
  1101.                  Usage:
  1102.                     SET DOS4GVM=[option[#value]] [option[#value]]...
  1103.  
  1104.                  (the '#' is  used with options  that take values  since
  1105.                  the DOS command shell will not accept "=")
  1106.  
  1107.                  Setting the DOS4GVM=1 will  use default values for  all
  1108.                  options.  Here are some control options:
  1109.  
  1110.                  MINMEM         The minimum  amount  of RAM  managed  by
  1111.                                 VMM.  The default is 512K
  1112.                  MAXMEM         The Maximum  amount  of RAM  managed  by
  1113.                                 VMM.  The default is 4MB.
  1114.                  SWAPMIN        The minimum or initial size of the  swap
  1115.                                 file.  If this  option is not used,  the
  1116.                                 size  of  the  swap  file  is  based  on
  1117.                                 VIRTUALSIZE (see below).
  1118.                  SWAPINC        The size by which the swap file grows.
  1119.                  SWAPNAME       The swap file name.  The default name is
  1120.                                 "DOS4GVM.SWP".  By  default the file  is
  1121.  
  1122.  
  1123.                                        Page 18
  1124.  
  1125.  
  1126.  
  1127.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1128.  
  1129.  
  1130.                                 in the  root  directory of  the  current
  1131.                                 drive.  Specify  the complete path  name
  1132.                                 if you  want to  keep the  swap file  on
  1133.                                 another drive.
  1134.                  DELETESWAP     Whether the  swap file  is deleted  when
  1135.                                 CImage exits.   By default  the file  is
  1136.                                 NOT deleted.  Program startup is quicker
  1137.                                 if the file is NOT deleted.
  1138.                  VIRTUALSIZE    The size  of  the virtual  memory  space
  1139.                                 (swap file plus allocated memory).   The
  1140.                                 default is 16MB.
  1141.  
  1142.                  If you wish to have a temporary swap file, and only use
  1143.                  no more than 4 MEG of RAM, then use the example below:
  1144.  
  1145.                     SET DOS4GVM=DELETESWAP maxmem#8192
  1146.  
  1147.                  NOTE:  This DOS Extender is especially advantageous for
  1148.                  programmers.  I HIGHLY RECOMMEND the Watcom C/C++32 9.5
  1149.                  compiler to  developers.    I own  Borland  C/C++  3.1,
  1150.                  Microsoft C/C++ 7.0, and Watcom C/C++32 9.5.  My choice
  1151.                  development tools are the Watcom Tools (although I hate
  1152.                  to give up the Turbo Debugger).  Take the time to learn
  1153.                  them, they are wonderful!
  1154.  
  1155.             SEE ALSO:
  1156.                  MEM
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.                                        Page 19
  1187.  
  1188.  
  1189.  
  1190.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1191.  
  1192.  
  1193.                                   COMMAND REFERENCE
  1194.  
  1195.             System level commands:
  1196.                  [EXIT/Q/QUIT] [`] [?/HELP] [REM] [ASK] [PAUSE] [ECHO]
  1197.                  [PERCENT]
  1198.  
  1199.             Batch file processing:
  1200.                  [IF] [IFNOT]
  1201.  
  1202.             Graphic File Manipulation tools:
  1203.                  [LOAD] [SAVE] [MERGE] [TERRain]
  1204.  
  1205.             Buffer Manipulation Tools:
  1206.                  [LB] [FREE] [SHOW] [MEM]
  1207.  
  1208.             Local Environment Variables and Macros:
  1209.                  [VMODE] [VCOLORS] [CRES] [SET] [MACRO] [GAMV]
  1210.                  [BIOSinfo] [VESAinfo]
  1211.  
  1212.             Image Enhancement tools:
  1213.                  [NEGate] [ADD] [SUBtract] [MULTiply] [DIVide]
  1214.                  [BRIghten] [DARKen] [NOISe] [GREYscale] [NORMalize]
  1215.                  [GAMMa] [CONV] [LC] [PIX] [OVERlay] [BIN]
  1216.  
  1217.             Image Manipulation tools:
  1218.                  [FLIP] [CPY]
  1219.  
  1220.             Image Generators:
  1221.                  [FADE] [PLASMA] [FILL]
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.                                        Page 20
  1250.  
  1251.  
  1252.  
  1253.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1254.  
  1255.  
  1256.             COMMAND:
  1257.                  ` (left single quote)
  1258.  
  1259.             PURPOSE:
  1260.                  Send a  command directly  to DOS  bypassing the  CImage
  1261.                  command processor shell.
  1262.  
  1263.             SYNTAX:
  1264.                  `<command>
  1265.                -or-
  1266.                  ` <command>
  1267.  
  1268.             DESCRIPTION:
  1269.                  This is useful for commands like MEM.  Since DOS has  a
  1270.                  MEM command as well as CImage, you  can only run DOS's
  1271.                  MEM by using the `left single quote'.
  1272.  
  1273.             NOTES:
  1274.                  Another way to perform a similar function is to  create
  1275.                  a DOS batch file that runs MEM called M.BAT.  This  is,
  1276.                  of course, not very practical.
  1277.  
  1278.             SHORTCUT:
  1279.                  None.
  1280.  
  1281.             SEE ALSO:
  1282.                  None.
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.                                        Page 21
  1313.  
  1314.  
  1315.  
  1316.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1317.  
  1318.  
  1319.  
  1320.             COMMAND:
  1321.                  : (colon)
  1322.  
  1323.             PURPOSE:
  1324.                  The `colon' is used in batch files only for designating
  1325.                  a label.
  1326.  
  1327.             SYNTAX:
  1328.                  :<label>
  1329.  
  1330.             DESCRIPTION:
  1331.                  Labels in Batch files allow the batch file control over
  1332.                  it's flow.
  1333.  
  1334.                  Labels are used in conjunction with the GOTO command to
  1335.                  alter batch program flow.
  1336.  
  1337.             NOTES:
  1338.                  None.
  1339.  
  1340.             SHORTCUT:
  1341.                  None.
  1342.  
  1343.             SEE ALSO:
  1344.                  BATCH ASK IF GOTO REM PAUSE ECHO
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.                                        Page 22
  1376.  
  1377.  
  1378.  
  1379.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1380.  
  1381.  
  1382.  
  1383.             COMMAND:
  1384.                  ADD
  1385.  
  1386.             PURPOSE:
  1387.                  Add the contents of two image buffers.
  1388.  
  1389.             SYNTAX:
  1390.                  ADD <buf1> <buf2> [outbuf]
  1391.  
  1392.             DESCRIPTION:
  1393.                  ADD will add, pixel by pixel each of the red, blue  and
  1394.                  green components  of <buf1>  and <buf2>  and place  the
  1395.                  result into [outbuf].
  1396.  
  1397.             NOTES:
  1398.                  If [outbuf]  is not  given,  then <buf1>  contains  the
  1399.                  result.
  1400.  
  1401.                  Upon adding the components, if the two components added
  1402.                  are greater  than  255,  then the  component  value  is
  1403.                  clipped to 255.
  1404.  
  1405.             SHORTCUT:
  1406.                  None.
  1407.  
  1408.             SEE ALSO:
  1409.                  SUBTRACT MULTIPLY DIVIDE
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.                                        Page 23
  1439.  
  1440.  
  1441.  
  1442.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1443.  
  1444.  
  1445.  
  1446.             COMMAND:
  1447.                  ASK
  1448.  
  1449.             PURPOSE:
  1450.                  ASK allows  users to  input single  keystrokes for  use
  1451.                  within CImage batch files.
  1452.  
  1453.             SYNTAX:
  1454.                  ASK <keylist> <string>
  1455.  
  1456.             DESCRIPTION:
  1457.                  The <keylist> contains all available keys to the  user.
  1458.                  For example, a Yes/No question  will have a keylist  of
  1459.                  `yn'.
  1460.  
  1461.                  The <string> contains the prompt.  This is displayed to
  1462.                  the user while ASK waits for a Key.
  1463.  
  1464.                  When ASK completes, ERRORLEVEL will be set according to
  1465.                  the key that was pressed.  The ERRORLEVEL starts at  1,
  1466.                  for the  first entry  in  the <keylist>  and  continues
  1467.                  until the keylist is complete.   In the above  example,
  1468.                  if the user pressed `y' then the ERRORLEVEL would be 1.
  1469.                  If the user would have pressed `n' then the  ERRORLEVEL
  1470.                  would have been 2.
  1471.  
  1472.             NOTES:
  1473.                  If a  key  not  in  the  <keylist>  was  pressed,  then
  1474.                  ERRORLEVEL is 0.
  1475.  
  1476.             SHORTCUT:
  1477.                  None.
  1478.  
  1479.             SEE ALSO:
  1480.                  BATCH IF
  1481.  
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.                                        Page 24
  1502.  
  1503.  
  1504.  
  1505.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1506.  
  1507.  
  1508.  
  1509.             COMMAND:
  1510.                  BIN
  1511.  
  1512.             PURPOSE:
  1513.                  Binarize a picture with a given threshold.
  1514.  
  1515.  
  1516.             SYNTAX:
  1517.                  BIN <inbuf> <threshold> [outbuf]
  1518.  
  1519.             DESCRIPTION:
  1520.                  BIN will  compare  each  of the  red,  blue  and  green
  1521.                  components of  <inbuf>  against <threshold>.    If  the
  1522.                  component value  is  less  than  <threshold>  then  the
  1523.                  component value is set to zero.  If the component value
  1524.                  is greater  than  or  equal to  <threshold>,  then  the
  1525.                  component value is set to 255.
  1526.  
  1527.                  Valid range for <threshold> is 0-255.
  1528.  
  1529.             NOTES:
  1530.                  If [outbuf]  is not  given, then  <inbuf> contains  the
  1531.                  result.
  1532.  
  1533.             SHORTCUT:
  1534.                  None.
  1535.  
  1536.             SEE ALSO:
  1537.                  BRIGHTEN DARKEN NORMALIZE GREYSCALE
  1538.  
  1539.  
  1540.  
  1541.  
  1542.  
  1543.  
  1544.  
  1545.  
  1546.  
  1547.  
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.                                        Page 25
  1565.  
  1566.  
  1567.  
  1568.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1569.  
  1570.  
  1571.  
  1572.             COMMAND:
  1573.                  BIOSINFO
  1574.  
  1575.             PURPOSE:
  1576.                  BIOSINFO  will  set  the  BIOS  graphics  settings  for
  1577.                  CImage.
  1578.  
  1579.             SYNTAX:
  1580.                  BIOSINFO <mode> [xres] [yres]
  1581.  
  1582.             DESCRIPTION:
  1583.                  BIOSINFO will set the current BIOS configuration to  be
  1584.                  used  for  displaying  image  buffers  using  the  SHOW
  1585.                  command.
  1586.  
  1587.                  By setting  the BIOS  settings  in CImage,  CImage  can
  1588.                  access virtually any video card that has BIOS  support.
  1589.                  Consult your video card's user's manual for information
  1590.                  on the BIOS mode and associated resolutions.
  1591.  
  1592.                  [xres] and [yres] may be omitted for quickly  switching
  1593.                  between two  different modes  of the  same  resolution.
  1594.                  Default BIOS resolution is 640x480.  The default number
  1595.                  of colors is 256 (see note below).
  1596.  
  1597.                  The BIOS is incapable of plotting pixels with more than
  1598.                  256 colors, so if the video mode that you are trying to
  1599.                  access has more than 256 colors, you MUST use the  VESA
  1600.                  capabilities.  Consult your video card's user's  manual
  1601.                  for more  information  on  VESA  capabilities  that  it
  1602.                  supports.
  1603.  
  1604.                  Users must also  perform a "VMODE  BIOS" to enable  the
  1605.                  BIOS mode for displaying image buffers.  See the  VMODE
  1606.                  command for more information on setting the mode.
  1607.  
  1608.                  TSRs are  available  to  allow  ALL  video  cards  VESA
  1609.                  support in software. See the VESAINFO command for  more
  1610.                  information on VESA support in CImage.
  1611.  
  1612.             NOTES:
  1613.                  <mode> must be in HEX.
  1614.  
  1615.                  VESA is the preferred graphics configuration to run.
  1616.  
  1617.                  CImage does  not  support  modes  with  less  than  256
  1618.                  colors.
  1619.  
  1620.             SHORTCUT:
  1621.                  BIOS
  1622.  
  1623.             SEE ALSO:
  1624.                  VESAINFO VMODE VCOLORS CRES
  1625.  
  1626.  
  1627.                                        Page 26
  1628.  
  1629.  
  1630.  
  1631.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1632.  
  1633.  
  1634.  
  1635.             COMMAND:
  1636.                  BRIGHTEN
  1637.  
  1638.             PURPOSE:
  1639.                  Brightens an image buffer.
  1640.  
  1641.             SYNTAX:
  1642.                  BRIGHTEN <amount> <inbuf> [outbuf]
  1643.  
  1644.             DESCRIPTION:
  1645.                  BRIGHTEN will  increase the  brightness of  <inbuf>  by
  1646.                  <amount>.  <amount> is a component value, so the  range
  1647.                  is 1-255.
  1648.  
  1649.             NOTES:
  1650.                  If [outbuf]  is not  given, then  <inbuf> contains  the
  1651.                  result.
  1652.  
  1653.             SHORTCUT:
  1654.                  BRI
  1655.  
  1656.             SEE ALSO:
  1657.                  DARKEN
  1658.  
  1659.  
  1660.  
  1661.  
  1662.  
  1663.  
  1664.  
  1665.  
  1666.  
  1667.  
  1668.  
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682.  
  1683.  
  1684.  
  1685.  
  1686.  
  1687.  
  1688.  
  1689.  
  1690.                                        Page 27
  1691.  
  1692.  
  1693.  
  1694.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1695.  
  1696.  
  1697.  
  1698.             COMMAND:
  1699.                  CONV
  1700.  
  1701.             PURPOSE:
  1702.                  Performs a 3x3, 5x5, or 7x7 convolution filter.
  1703.  
  1704.             SYNTAX:
  1705.                  CONV <filter> <inbuf> [outbuf]
  1706.  
  1707.             DESCRIPTION:
  1708.                  Performs a Convolution filter  (defined as <filter>  in
  1709.                  the filter  file (defined  by the  FILTERFILE  command;
  1710.                  default filename is FILTERS.FLT). file) on <inbuf>  and
  1711.                  places the result into [outbuf].
  1712.  
  1713.                  CONV  perform  "convolution"   filters.     Convolution
  1714.                  filters  are  a  common  way  of  changing  an  image's
  1715.                  appearance.  Some common  filters will blur or  sharpen
  1716.                  an image, others may highlight edges, or remove all  of
  1717.                  the image completely leaving only the edges.
  1718.  
  1719.                  The filters are contained in the filter file.
  1720.  
  1721.                  The Available filters can be obtained with the  command
  1722.                  LC (for  List  Convolutions).   See  HELP LC  for  more
  1723.                  information on the LC command.
  1724.  
  1725.                  The filter description  format for a  3x3 filter is  as
  1726.                  follows:
  1727.                       FILTER <filtername> <size>
  1728.                       <upper-left>  <upper-center>  <upper-right>
  1729.                       <center-left> <center-center> <center-right>
  1730.                       <lower-left>  <lower-center>  <lower-right>
  1731.                       <operator> <operand> <bias>
  1732.  
  1733.                       Any text following semicolons are comments
  1734.  
  1735.                  Where <filtername> is the name of the filter.  This  is
  1736.                  where CONV looks for the command line option  <filter>.
  1737.                  <size> is  the size  of the  filter (3,  5 or  7  only,
  1738.                  others are  ignored).   For 5x5  and 7x7  filters,  the
  1739.                  above example is incomplete, since from <upper-left> to
  1740.                  <lower-right> would be a 5x5 or 7x7 "grid".
  1741.  
  1742.                  Convolutions are quite  simple.  For  each pixel in  an
  1743.                  image, the filter grid is overlaid onto that pixel  and
  1744.                  it's neighbors with the <center-center> element of  the
  1745.                  filter grid  aligned  onto  the current  pixel  in  the
  1746.                  image, and  the  outer  elements  in  the  filter  grid
  1747.                  overlaying the  current pixel's  neighbors.   The  next
  1748.                  step is to  multiply each  element in  the filter  grid
  1749.                  with it's corresponding  overlaid pixel value.     Once
  1750.                  all  these  values  have  been  calculated,  add   them
  1751.  
  1752.  
  1753.                                        Page 28
  1754.  
  1755.  
  1756.  
  1757.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1758.  
  1759.  
  1760.                  together  and  perform  the  operation  (/  8  for   an
  1761.                  <operator> of '/'  and an <operand>  of '8'.)   Lastly,
  1762.                  add the <bias> value.   If the  addition of <bias>  (or
  1763.                  subtraction of  <bias> if  it  is negative)  takes  the
  1764.                  result above 255 or below 0, then the value is  clipped
  1765.                  to 0 or 255, respectively.
  1766.  
  1767.                  A good trick for trying your  own is to take a  current
  1768.                  filter, copy it, change the new copy's name, and modify
  1769.                  it.   If you  have  problems getting  usable  resulting
  1770.                  images, try adding  all of the  values in the  filter's
  1771.                  grid and  placing  that  value  in  <operand>  with  an
  1772.                  <operator> of '/'
  1773.  
  1774.             NOTES:
  1775.                  The valid range for <bias> is 0-255.
  1776.  
  1777.                  Valid <operator> values are:
  1778.                       +.......Add <operand>
  1779.                       -.......Subtract <operand>
  1780.                       *.......Multiply by  <operand>  /.......Divide  by
  1781.                               <operand>
  1782.                       M.......Sort all multiplied grid elements, and use
  1783.                               the median.  Ignore <operand>  -- Operand
  1784.                               MUST still be present
  1785.                       <.......Sort all multiplied grid elements, and use
  1786.                               the lowest.  Ignore <operand>  -- Operand
  1787.                               MUST still be present
  1788.                       >.......Sort all multiplied grid elements, and use
  1789.                               the highest. Ignore  <operand> -- Operand
  1790.                               MUST still be present
  1791.  
  1792.                  If [outbuf] is  not given,  then CONV  will create  the
  1793.                  first available buffer.
  1794.  
  1795.                  CImage will search for the filter file in the following
  1796.                  order:
  1797.                       1. The current directory
  1798.                       2. The default CImage directory (where  CIMAGE.EXE
  1799.                       is stored)
  1800.  
  1801.                  CAUTION:   The median  ('M'),  dilate ('>')  and  erode
  1802.                  ('<') functions take a LONG TIME in 5x5 or 7x7 filters.
  1803.                  Try  to  stick  with   using  3x3  filters  for   these
  1804.                  operators.
  1805.  
  1806.             SHORTCUT:
  1807.                  None.
  1808.  
  1809.             SEE ALSO:
  1810.                  LC FILTERFILE
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.                                        Page 29
  1817.  
  1818.  
  1819.  
  1820.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1821.  
  1822.  
  1823.  
  1824.             COMMAND:
  1825.                  CPY
  1826.  
  1827.             PURPOSE:
  1828.                  Copy an image buffer to another.
  1829.  
  1830.             SYNTAX:
  1831.                  CPY <inbuf> [outbuf]
  1832.  
  1833.             DESCRIPTION:
  1834.                  CPY will copy <inbuf> into [outbuf], creating  [outbuf]
  1835.                  in the process. [outbuf] must not exist.
  1836.  
  1837.             NOTES:
  1838.                  If [outbuf]  is not  given, then  CPY will  create  the
  1839.                  first available buffer.
  1840.  
  1841.                  CPY  was   not   named  "COPY"   because   of   obvious
  1842.                  interference with the DOS COPY command.
  1843.  
  1844.             SHORTCUT:
  1845.                  None.
  1846.  
  1847.             SEE ALSO:
  1848.                  None.
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.  
  1856.  
  1857.  
  1858.  
  1859.  
  1860.  
  1861.  
  1862.  
  1863.  
  1864.  
  1865.  
  1866.  
  1867.  
  1868.  
  1869.  
  1870.  
  1871.  
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.                                        Page 30
  1880.  
  1881.  
  1882.  
  1883.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1884.  
  1885.  
  1886.  
  1887.             COMMAND:
  1888.                  CRES
  1889.  
  1890.             PURPOSE:
  1891.                  Sets  the  color  bit  resolution  for  256  color  VGA
  1892.                  graphics.
  1893.  
  1894.             SYNTAX:
  1895.                  CRES [value]
  1896.  
  1897.             DESCRIPTION:
  1898.                  When CImage needs to display a 24-bit image onto a  256
  1899.                  color display,  CImage needs  to reduce  the number  of
  1900.                  colors that the image uses.  This is by sorting  colors
  1901.                  by popularity, choosing the  most popular, and  mapping
  1902.                  the rest of the colors  to it's closest counterpart  in
  1903.                  the list of the top 256.
  1904.  
  1905.                  When CImage needs to display an image, it needs to know
  1906.                  how many shades of red, green, and blue the video  card
  1907.                  allows.  Most cards allow for 6 bits of resolution  (0-
  1908.                  63, or 64)  for each element.   To  calculate how  many
  1909.                  displayable colors,  multiply red  * green  * blue,  or
  1910.                  64*64*64 =  262,144.   This  is  the number  of  colors
  1911.                  possible,  however   only   256  colors   are   allowed
  1912.                  simultaneously.  CRES tells CImage how many shades  the
  1913.                  video card allows for each  element so that CImage  can
  1914.                  reduce the number of  shades as well  as the number  of
  1915.                  colors.
  1916.  
  1917.             NOTES:
  1918.                  If [value] is  not given,  then CRES  will display  the
  1919.                  current value.
  1920.  
  1921.                  CImage does  not  support  modes  with  less  than  256
  1922.                  colors.
  1923.  
  1924.                  When CImage loads  or creates  an image  buffer, it  is
  1925.                  stored internally as  a 24-bit image.   Even if  CImage
  1926.                  loads a 256-color  GIF file, it  is still converted  to
  1927.                  24-bits as it is loaded.  This is because modifications
  1928.                  to an image  buffer may increase  the number of  colors
  1929.                  that it uses.  This also  allows for CImage to  perform
  1930.                  functions on  image buffers  with the  least amount  of
  1931.                  accuracy loss.
  1932.  
  1933.             SHORTCUT:
  1934.                  None.
  1935.  
  1936.             SEE ALSO:
  1937.                  VESAINFO BIOSINFO VMODE VCOLORS CRES SHOW
  1938.  
  1939.  
  1940.  
  1941.  
  1942.                                        Page 31
  1943.  
  1944.  
  1945.  
  1946.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  1947.  
  1948.  
  1949.  
  1950.             COMMAND:
  1951.                  DARKEN
  1952.  
  1953.             PURPOSE:
  1954.                  Darkens an image buffer.
  1955.  
  1956.             SYNTAX:
  1957.                  DARKEN <amount> <inbuf> [outbuf]
  1958.  
  1959.             DESCRIPTION:
  1960.                  DARKEN will  decrease  the  brightness  of  <inbuf>  by
  1961.                  <amount>.  <amount> is a component value, so the  range
  1962.                  is 1-255.
  1963.  
  1964.             NOTES:
  1965.                  If [outbuf]  is not  given, then  <inbuf> contains  the
  1966.                  result.
  1967.  
  1968.             SHORTCUT:
  1969.                  DARK
  1970.  
  1971.             SEE ALSO:
  1972.                  BRIGHTEN
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.  
  1988.  
  1989.  
  1990.  
  1991.  
  1992.  
  1993.  
  1994.  
  1995.  
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003.  
  2004.  
  2005.                                        Page 32
  2006.  
  2007.  
  2008.  
  2009.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2010.  
  2011.  
  2012.  
  2013.             COMMAND:
  2014.                  DIVIDE
  2015.  
  2016.             PURPOSE:
  2017.                  Divide the contents of two image buffers.
  2018.  
  2019.             SYNTAX:
  2020.                  DIVIDE <buf1> <buf2> [outbuf]
  2021.  
  2022.             DESCRIPTION:
  2023.                  DIVIDE will divide,  pixel by  pixel each  of the  red,
  2024.                  blue and  green components  of  <buf1> and  <buf2>  and
  2025.                  place the result into [outbuf].
  2026.  
  2027.             NOTES:
  2028.                  If [outbuf]  is not  given,  then <buf1>  contains  the
  2029.                  result.
  2030.  
  2031.                  Upon dividing the components, if a component if  <buf2>
  2032.                  is zero, then the result is automatically zero, since a
  2033.                  divide by zero is impossible.
  2034.  
  2035.             SHORTCUT:
  2036.                  DIV
  2037.  
  2038.             SEE ALSO:
  2039.                  ADD SUBTRACT MULTIPLY DIVIDE
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.  
  2054.  
  2055.  
  2056.  
  2057.  
  2058.  
  2059.  
  2060.  
  2061.  
  2062.  
  2063.  
  2064.  
  2065.  
  2066.  
  2067.  
  2068.                                        Page 33
  2069.  
  2070.  
  2071.  
  2072.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2073.  
  2074.  
  2075.  
  2076.             COMMAND:
  2077.                  ECHO
  2078.  
  2079.             PURPOSE:
  2080.                  ECHO is used to display text during the execution of an
  2081.                  CImage batch file.
  2082.  
  2083.             SYNTAX:
  2084.                  ECHO ON
  2085.                -or-
  2086.                  ECHO OFF
  2087.                -or-
  2088.                  ECHO <string>
  2089.  
  2090.             DESCRIPTION:
  2091.                  Normally as a batch file  is running, the commands  are
  2092.                  "echoed" to the screen as they are executed.  This  can
  2093.                  be turned off  by adding the  command ECHO  OFF to  the
  2094.                  batch file.  Once it has  been turned off, the ECHO  ON
  2095.                  can turn it back on.   The ECHO setting is reset to  ON
  2096.                  when all batch files have completed processing.
  2097.  
  2098.                  If ECHO is  followed by  <string>, then  the string  is
  2099.                  ECHOed to the screen.
  2100.  
  2101.             NOTES:
  2102.                  An "@" character placed in front of a command line in a
  2103.                  batch file prevents that line from echoing.
  2104.  
  2105.                  An ECHO. will echo a blank line to the screen.
  2106.  
  2107.                  Currently, ECHO will echo all text as upper-case only.
  2108.  
  2109.             SHORTCUT:
  2110.                  None.
  2111.  
  2112.             SEE ALSO:
  2113.                  BATCH ASK IF GOTO : REM PAUSE
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.  
  2120.  
  2121.  
  2122.  
  2123.  
  2124.  
  2125.  
  2126.  
  2127.  
  2128.  
  2129.  
  2130.  
  2131.                                        Page 34
  2132.  
  2133.  
  2134.  
  2135.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2136.  
  2137.  
  2138.  
  2139.             COMMAND:
  2140.                  EXIT
  2141.  
  2142.             PURPOSE:
  2143.                  EXIT will exit from the CImage command processor  shell
  2144.                  to the previous level if one exists, otherwise, you are
  2145.                  exited to the DOS command prompt.
  2146.  
  2147.             SYNTAX:
  2148.                  Exit
  2149.  
  2150.             DESCRIPTION:
  2151.                  Once running CImage,  you can run  different levels  of
  2152.                  the CImage command pro cessor.  This is  done by simply
  2153.                  running CImage from  within itself.   Once running  the
  2154.                  second level, you  can exit  to the  previous level  by
  2155.                  typing EXIT.
  2156.  
  2157.             NOTES:
  2158.                  None.
  2159.  
  2160.             SHORTCUT:
  2161.                  Q -or- QUIT
  2162.  
  2163.             SEE ALSO:
  2164.                  None.
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.  
  2186.  
  2187.  
  2188.  
  2189.  
  2190.  
  2191.  
  2192.  
  2193.  
  2194.                                        Page 35
  2195.  
  2196.  
  2197.  
  2198.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2199.  
  2200.  
  2201.  
  2202.             COMMAND:
  2203.                  FADE
  2204.  
  2205.             PURPOSE:
  2206.                  Creates a test image that fades from light to dark.
  2207.  
  2208.             SYNTAX:
  2209.                  FADE <xres> <yres> <red> <green> <blue> [outbuf] [dir]
  2210.  
  2211.             DESCRIPTION:
  2212.                  FADE will  create a  256-color  image that  fades  from
  2213.                  light to dark the elements of <red>, <green> and <blue>
  2214.                  in the direction of [dir],  and place it into  [outbuf]
  2215.                  at a resolution of <xres> by <yres>.
  2216.  
  2217.                  Each of the <red>, <green> and <blue> component  values
  2218.                  are entered as a '0' or a non-zero value.  Any '1' must
  2219.                  be placed in this value to cause FADE to add that color
  2220.                  to the fade.   A fade of 1  0 0 will  create a fade  of
  2221.                  only shades of red.
  2222.  
  2223.                  Use [dir] to denote which direction to create the  fade
  2224.                  image.  Valid  values are  U, D,  L, R,  for Up,  Down,
  2225.                  Left, Right  respectively.   [dir] points  to the  dark
  2226.                  side of the image  (Up would start at  the top as  dark
  2227.                  and work down to light).
  2228.  
  2229.             NOTES:
  2230.                  If [outbuf] is  not given,  then FADE  will create  the
  2231.                  first available buffer.
  2232.  
  2233.                  If [dir] is not given, then  FADE will use 'D'  (down).
  2234.                  FADE was originally a test image for the developer, but
  2235.                  was left in for  users.  One use  might be to create  a
  2236.                  fade, and subtract that from another image for a simple
  2237.                  effect.
  2238.  
  2239.                  The "Loaded as file name" is set to FADE.TGA
  2240.  
  2241.             SHORTCUT:
  2242.                  None.
  2243.  
  2244.             SEE ALSO:
  2245.                  None.
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.  
  2252.  
  2253.  
  2254.  
  2255.  
  2256.  
  2257.                                        Page 36
  2258.  
  2259.  
  2260.  
  2261.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2262.  
  2263.  
  2264.  
  2265.             COMMAND:
  2266.                  FILL
  2267.  
  2268.             PURPOSE:
  2269.                  Fills a buffer of a given color.
  2270.  
  2271.             SYNTAX:
  2272.                  FILL <xres> <yres> <red> <green> <blue> [outbuf]
  2273.  
  2274.             DESCRIPTION:
  2275.                  FILL will  create  an  image of  resolution  <xres>  by
  2276.                  <yres>  filled  with  the  color  specified  by  <red>,
  2277.                  <green> and <blue> and place it into [outbuf].
  2278.  
  2279.             NOTES:
  2280.                  If [outbuf] is  not given,  then FILL  will create  the
  2281.                  first available buffer.
  2282.  
  2283.                  The "Loaded as file name" is set to FILLED.TGA
  2284.  
  2285.             SHORTCUT:
  2286.                  None.
  2287.  
  2288.             SEE ALSO:
  2289.                  None.
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.  
  2317.  
  2318.  
  2319.  
  2320.                                        Page 37
  2321.  
  2322.  
  2323.  
  2324.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2325.  
  2326.  
  2327.  
  2328.             COMMAND:
  2329.                  FILTERFILE
  2330.  
  2331.             PURPOSE:
  2332.                  Sets the filename used for the convolution filters.
  2333.  
  2334.             SYNTAX:
  2335.                  FILTERFILE [filename]
  2336.  
  2337.             DESCRIPTION:
  2338.                  FILTERFILE sets the filename that  is used by the  CONV
  2339.                  and LC  commands  for  locating  and  performing  user-
  2340.                  defined convolution filters.  See the CONV command  for
  2341.                  more information on performing convolution filters.
  2342.  
  2343.                  The default name  is FILTERS.FLT, and  must be  located
  2344.                  in, first, the current directory.   If the filter  file
  2345.                  is not found  there, then  CImage will  search for  the
  2346.                  file in the directory from which it was originally run.
  2347.  
  2348.             NOTES:
  2349.                  If [filename] is  not given, then  the FILTERFILE  will
  2350.                  display the current filename.
  2351.  
  2352.             SHORTCUT:
  2353.                  FFILE
  2354.  
  2355.             SEE ALSO:
  2356.                  CONV LC
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.  
  2382.  
  2383.                                        Page 38
  2384.  
  2385.  
  2386.  
  2387.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2388.  
  2389.  
  2390.  
  2391.             COMMAND:
  2392.                  FLIP
  2393.  
  2394.             PURPOSE:
  2395.                  Flip an image buffer top to bottom or left to right.
  2396.  
  2397.             SYNTAX:
  2398.                  FLIP <dir> <inbuf> [outbuf]
  2399.  
  2400.             DESCRIPTION:
  2401.                  FLIP will  flip the  buffer  <inbuf> in  the  direction
  2402.                  specified by <dir> and place the result into [outbuf].
  2403.  
  2404.                  Valid values for  <dir> are U,  D, L, R  for Up,  Down,
  2405.                  Left, Right, respectively.
  2406.  
  2407.             NOTES:
  2408.                  If [outbuf] is  not given,  then the  result is  placed
  2409.                  into <inbuf>.
  2410.  
  2411.                  There is no difference between Up  and Down.  There  is
  2412.                  also no difference between Left and Right.
  2413.  
  2414.             SHORTCUT:
  2415.                  None.
  2416.  
  2417.             SEE ALSO:
  2418.                  None.
  2419.  
  2420.  
  2421.  
  2422.  
  2423.  
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.                                        Page 39
  2447.  
  2448.  
  2449.  
  2450.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2451.  
  2452.  
  2453.  
  2454.             COMMAND:
  2455.                  FREE
  2456.  
  2457.             PURPOSE:
  2458.                  Release a buffer, freeing up the memory that it uses.
  2459.  
  2460.             SYNTAX:
  2461.                  FREE <buf>
  2462.                -or-
  2463.                  FREE ALL
  2464.  
  2465.             DESCRIPTION:
  2466.                  FREE will free the memory used  by <buf>.  If <buf>  is
  2467.                  "ALL", then all buffers will be freed.
  2468.  
  2469.             NOTES:
  2470.                  FREE will not ask to verify, even if you use "FREE ALL"
  2471.  
  2472.             SHORTCUT:
  2473.                  None.
  2474.  
  2475.             SEE ALSO:
  2476.                  None.
  2477.  
  2478.  
  2479.  
  2480.  
  2481.  
  2482.  
  2483.  
  2484.  
  2485.  
  2486.  
  2487.  
  2488.  
  2489.  
  2490.  
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.                                        Page 40
  2510.  
  2511.  
  2512.  
  2513.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2514.  
  2515.  
  2516.  
  2517.             COMMAND:
  2518.                  GAMMA
  2519.  
  2520.             PURPOSE:
  2521.                  Perform gamma correction.
  2522.  
  2523.             SYNTAX:
  2524.                  GAMMA <inbuf> [outbuf]
  2525.  
  2526.             DESCRIPTION:
  2527.                  GAMMA will correct the gamma  of <inbuf> and place  the
  2528.                  result into [outbuf].
  2529.  
  2530.                  It is usually safe to assume that black is 0 and  white
  2531.                  is 255.  How ever, it is not necessarily  true that 128
  2532.                  appears exactly as a medium grey (which would mean that
  2533.                  color intensity output is linear).  On most  computers,
  2534.                  color intensity  output  is  not linear,  and  must  be
  2535.                  adjusted accordingly.  The  GAMMA command will  correct
  2536.                  this on images  and make it  appear that  the image  is
  2537.                  being displayed with linear color intensity output.
  2538.  
  2539.                  The GAMMA  function  uses the  value  set by  the  GAMV
  2540.                  command to set the amount of gamma correction.
  2541.  
  2542.             NOTES:
  2543.                  If [outbuf] is  not given,  then the  result is  placed
  2544.                  into <inbuf>
  2545.  
  2546.             SHORTCUT:
  2547.                  GAMM
  2548.  
  2549.             SEE ALSO:
  2550.                  GAMV
  2551.  
  2552.  
  2553.  
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.                                        Page 41
  2573.  
  2574.  
  2575.  
  2576.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2577.  
  2578.  
  2579.  
  2580.             COMMAND:
  2581.                  GAMV
  2582.  
  2583.             PURPOSE:
  2584.                  Set the gamma correction level.
  2585.  
  2586.             SYNTAX:
  2587.                  GAMV [value]
  2588.  
  2589.             DESCRIPTION:
  2590.                  GAMV will set the gamma correction level for the  GAMMA
  2591.                  command.   See  the  GAMMA command  for  more  detailed
  2592.                  information on gamma correction.
  2593.  
  2594.             NOTES:
  2595.                  If [value] is not given, then the current value will be
  2596.                  displayed.
  2597.  
  2598.                  The default value for GAMV is 0.6.
  2599.  
  2600.             SHORTCUT:
  2601.                  None.
  2602.  
  2603.             SEE ALSO:
  2604.                  GAMMA
  2605.  
  2606.  
  2607.  
  2608.  
  2609.  
  2610.  
  2611.  
  2612.  
  2613.  
  2614.  
  2615.  
  2616.  
  2617.  
  2618.  
  2619.  
  2620.  
  2621.  
  2622.  
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.                                        Page 42
  2636.  
  2637.  
  2638.  
  2639.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2640.  
  2641.  
  2642.  
  2643.             COMMAND:
  2644.                  GOTO
  2645.  
  2646.             PURPOSE:
  2647.                  Alter the program flow within an CImage batch file.
  2648.  
  2649.             SYNTAX:
  2650.                  GOTO <label>
  2651.  
  2652.             DESCRIPTION:
  2653.                  The GOTO  command will  cause the  batch file  to  stop
  2654.                  processing, locate <label> within  the batch file,  and
  2655.                  continue processing there.  Labels are designated by  a
  2656.                  ':'.   See the  ':' for  more detailed  information  on
  2657.                  labels.
  2658.  
  2659.             NOTES:
  2660.                  The GOTO command is meant to be used within batch files
  2661.                  only.
  2662.  
  2663.             SHORTCUT:
  2664.                  None.
  2665.  
  2666.             SEE ALSO:
  2667.                  BATCH ASK IF : REM PAUSE ECHO
  2668.  
  2669.  
  2670.  
  2671.  
  2672.  
  2673.  
  2674.  
  2675.  
  2676.  
  2677.  
  2678.  
  2679.  
  2680.  
  2681.  
  2682.  
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.                                        Page 43
  2699.  
  2700.  
  2701.  
  2702.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2703.  
  2704.  
  2705.  
  2706.             COMMAND:
  2707.                  GREYSCALE
  2708.  
  2709.             PURPOSE:
  2710.                  Convert the current image into a greyscale image.
  2711.  
  2712.             SYNTAX:
  2713.                  GREYSCALE <inbuf> [outbuf]
  2714.  
  2715.             DESCRIPTION:
  2716.                  GREYSCALE will convert <inbuf>  to greyscale and  place
  2717.                  the results into [outbuf].
  2718.  
  2719.                  Converting an image to grayscale is very simple.   Each
  2720.                  pixel's red,  green and  blue components  are  compared
  2721.                  against each  other  to find  the  largest  (brightest)
  2722.                  value, then all three components are set to this value.
  2723.  
  2724.             NOTES:
  2725.                  If [outbuf] is  not given,  then the  result is  placed
  2726.                  into <inbuf>
  2727.  
  2728.                  There is no command to convert from greyscale to color,
  2729.                  since  a  greyscale  image  does  not  contain  enough
  2730.                  information to perform such a task.
  2731.  
  2732.             SHORTCUT:
  2733.                  GREY
  2734.  
  2735.             SEE ALSO:
  2736.                  None.
  2737.  
  2738.  
  2739.  
  2740.  
  2741.  
  2742.  
  2743.  
  2744.  
  2745.  
  2746.  
  2747.  
  2748.  
  2749.  
  2750.  
  2751.  
  2752.  
  2753.  
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761.                                        Page 44
  2762.  
  2763.  
  2764.  
  2765.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2766.  
  2767.  
  2768.  
  2769.             COMMAND:
  2770.                  IF
  2771.  
  2772.             PURPOSE:
  2773.                  The IF and IFNOT  commands allow conditional  execution
  2774.                  of  commands  based  on   the  results  of  a   logical
  2775.                  condition.   When the  condition is  true, then  CImage
  2776.                  executes the <command>;  otherwise, CImage will  ignore
  2777.                  the command.
  2778.  
  2779.             SYNTAX:
  2780.                  IF ERRORLEVEL <number> <command>
  2781.                -or-
  2782.                  IFNOT ERRORLEVEL <number> <command>
  2783.                -or-
  2784.                  IF <string1> == <string2> <command>
  2785.                -or-
  2786.                  IFNOT <string1> == <string2> <command>
  2787.                -or-
  2788.                  IF EXIST <filename> <command>
  2789.                -or-
  2790.                  IFNOT EXIST <filename> <command>
  2791.  
  2792.             DESCRIPTION:
  2793.                  The conditions are described as follows:
  2794.                  ERRORLEVEL      True if,  and  only  if,  the  previous
  2795.                                  command executed had an exit code equal
  2796.                                  to <number>.
  2797.                  <string1> == <string2>  True if, and only if, <string1>
  2798.                                  is equal  to  <string2>.   The  strings
  2799.                                  must not contain spaces.
  2800.                  EXIST           True if,  and only  if, the  <filename>
  2801.                                  exists in the current directory.
  2802.  
  2803.             NOTES:
  2804.                  Currently, the only CImage command that returns an exit
  2805.                  code is the ASK  command.  DOS  command exit codes  are
  2806.                  currently not supported.
  2807.  
  2808.             SHORTCUT:
  2809.                  None.
  2810.  
  2811.             SEE ALSO:
  2812.                  BATCH ASK GOTO : REM PAUSE ECHO
  2813.  
  2814.  
  2815.  
  2816.  
  2817.  
  2818.  
  2819.  
  2820.  
  2821.  
  2822.  
  2823.  
  2824.                                        Page 45
  2825.  
  2826.  
  2827.  
  2828.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2829.  
  2830.  
  2831.             COMMAND:
  2832.                  LB
  2833.  
  2834.             PURPOSE:
  2835.                  List the currently allocated image buffers.
  2836.  
  2837.             SYNTAX:
  2838.                  LB
  2839.  
  2840.             DESCRIPTION:
  2841.                  LB  will  list  the   current  information  about   all
  2842.                  currently allocated buffers:
  2843.                     Buffer number
  2844.                     Loaded file name
  2845.                     Loaded file type
  2846.                     Last saved name
  2847.                     Last saved file type
  2848.                     Resolution
  2849.  
  2850.             NOTES:
  2851.                  None.
  2852.  
  2853.             SHORTCUT:
  2854.                  None.
  2855.  
  2856.             SEE ALSO:
  2857.                  LOAD SAVE MERGE
  2858.  
  2859.  
  2860.  
  2861.  
  2862.  
  2863.  
  2864.  
  2865.  
  2866.  
  2867.  
  2868.  
  2869.  
  2870.  
  2871.  
  2872.  
  2873.  
  2874.  
  2875.  
  2876.  
  2877.  
  2878.  
  2879.  
  2880.  
  2881.  
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887.                                        Page 46
  2888.  
  2889.  
  2890.  
  2891.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2892.  
  2893.  
  2894.  
  2895.             COMMAND:
  2896.                  LC
  2897.  
  2898.             PURPOSE:
  2899.                  List all convolution  filters contained  in the  filter
  2900.                  file  (defined  by  the  FILTERFILE  command;   default
  2901.                  filename is FILTERS.FLT).
  2902.  
  2903.             SYNTAX:
  2904.                  LC
  2905.  
  2906.             DESCRIPTION:
  2907.                  LC Will list all the convolution filters in the  filter
  2908.                  file sorted by grid size (3, 5 or 7).
  2909.  
  2910.             NOTES:
  2911.                  CImage will search for the filter file in the following
  2912.                  order:
  2913.                   1.  The current directory
  2914.                   2.  The default CImage directory (where CIMAGE.EXE is
  2915.                       stored)
  2916.  
  2917.             SHORTCUT:
  2918.                  None.
  2919.  
  2920.             SEE ALSO:
  2921.                  CONV FILTERFILE
  2922.  
  2923.  
  2924.  
  2925.  
  2926.  
  2927.  
  2928.  
  2929.  
  2930.  
  2931.  
  2932.  
  2933.  
  2934.  
  2935.  
  2936.  
  2937.  
  2938.  
  2939.  
  2940.  
  2941.  
  2942.  
  2943.  
  2944.  
  2945.  
  2946.  
  2947.  
  2948.  
  2949.  
  2950.                                        Page 47
  2951.  
  2952.  
  2953.  
  2954.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  2955.  
  2956.  
  2957.  
  2958.             COMMAND:
  2959.                  LOAD
  2960.  
  2961.             PURPOSE:
  2962.                  LOAD will load images into memory.
  2963.  
  2964.             SYNTAX:
  2965.                  LOAD <filename> [buffer]
  2966.  
  2967.             DESCRIPTION:
  2968.                  LOAD will load <filename> into [buffer].
  2969.  
  2970.             NOTES:
  2971.                  If [buffer] is  not given,  then LOAD  will create  the
  2972.                  first available buffer.
  2973.  
  2974.                  Currently, LOAD does not interrogate the file  contents
  2975.                  to decide what type of image file to load.  The  file's
  2976.                  extension is used to decide the file's type.  Once  the
  2977.                  file type  is obtained  from the  extension, LOAD  will
  2978.                  verify the file is indeed the proper file type.
  2979.  
  2980.                  Current supported file types are:
  2981.                     IMG - VIVID/BOB format
  2982.                     GIF - GIF87a (and GIF89a files that are compatible)
  2983.                     TGA - Only type 2, uncompressed
  2984.                     BMP - All versions (Windows, and OS/2)
  2985.                     IPI - CImage's internal format (See HELP IPI for
  2986.                           details on format)
  2987.  
  2988.             SHORTCUT:
  2989.                  None.
  2990.  
  2991.             SEE ALSO:
  2992.                  SAVE MERGE LB
  2993.  
  2994.  
  2995.  
  2996.  
  2997.  
  2998.  
  2999.  
  3000.  
  3001.  
  3002.  
  3003.  
  3004.  
  3005.  
  3006.  
  3007.  
  3008.  
  3009.  
  3010.  
  3011.  
  3012.  
  3013.                                        Page 48
  3014.  
  3015.  
  3016.  
  3017.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3018.  
  3019.  
  3020.  
  3021.             COMMAND:
  3022.                  MACRO
  3023.  
  3024.             PURPOSE:
  3025.                  Creates a macro.
  3026.  
  3027.             SYNTAX:
  3028.                  MACRO [macro] [cmd-line]
  3029.  
  3030.             DESCRIPTION:
  3031.                  MACRO will define [macro] to be [command-line]
  3032.                  Macros are  shortcuts.    You  can  define  almost  any
  3033.                  command-line to a macro.
  3034.  
  3035.                  Say you define "P" to be  "PLASMA 640 480 3.3".   Then,
  3036.                  every time you type a "P" (followed by [RETURN]) on the
  3037.                  command line, CImage will interpret it as: "PLASMA  640
  3038.                  480 3.3" (which will create a plasma image the size  of
  3039.                  640x480 with the grain factor of 3.3, and place it into
  3040.                  the first available buffer).
  3041.  
  3042.                  Macros  can  also  be  inserted  into  a   command-line
  3043.                  anywhere.  For example, you  could use "plasma 640  480
  3044.                  PVAL" where PVAL has been defined as "3.3".  Macros may
  3045.                  also reference  themselves.    "P" may  be  defined  as
  3046.                  "PLASMA 640 480 PVAL" and if  PVAL has been defined  as
  3047.                  "3.3", then that line "P" is interpreted as "PLASMA 640
  3048.                  480 3.3".
  3049.  
  3050.             NOTES:
  3051.                  Macros  may   reference  environment   variables,   but
  3052.                  environment variables may not reference macros.
  3053.                  If [cmd-line] is  not given, then  the [macro] will  be
  3054.                  removed from the macro list.
  3055.  
  3056.                  If [macro]  and [cmd-line]  are not  given, then  MACRO
  3057.                  will list all currently defined macros.
  3058.  
  3059.                  [cmd-line] may contain spaces.
  3060.  
  3061.                  Since a semicolon on the CImage command line is used to
  3062.                  separate multiple commands, you need to use the  carrot
  3063.                  (^) character where semicolons are to be placed.  These
  3064.                  semicolons will not,  however, become separate  command
  3065.                  lines within a single  macro, they will be  interpreted
  3066.                  as one command line.
  3067.  
  3068.                  Macros must  be  separated  from  other  words  on  the
  3069.                  command line they are to be used in by a space.
  3070.  
  3071.             SHORTCUT:
  3072.                  None.
  3073.  
  3074.  
  3075.  
  3076.                                        Page 49
  3077.  
  3078.  
  3079.  
  3080.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3081.  
  3082.  
  3083.             SEE ALSO:
  3084.                  SET
  3085.  
  3086.  
  3087.  
  3088.  
  3089.  
  3090.  
  3091.  
  3092.  
  3093.  
  3094.  
  3095.  
  3096.  
  3097.  
  3098.  
  3099.  
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109.  
  3110.  
  3111.  
  3112.  
  3113.  
  3114.  
  3115.  
  3116.  
  3117.  
  3118.  
  3119.  
  3120.  
  3121.  
  3122.  
  3123.  
  3124.  
  3125.  
  3126.  
  3127.  
  3128.  
  3129.  
  3130.  
  3131.  
  3132.  
  3133.  
  3134.  
  3135.  
  3136.  
  3137.  
  3138.  
  3139.                                        Page 50
  3140.  
  3141.  
  3142.  
  3143.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3144.  
  3145.  
  3146.  
  3147.             COMMAND:
  3148.                  MEM
  3149.  
  3150.             PURPOSE:
  3151.                  Display the current status of memory.
  3152.  
  3153.             SYNTAX:
  3154.                  MEM
  3155.  
  3156.             DESCRIPTION:
  3157.                  MEM will display the following information:
  3158.                     1. Largest available block of memory
  3159.                     2. Size of paging/file partition
  3160.  
  3161.                  The "Largest available block of memory" is quite  self-
  3162.                  explanatory. This  includes all  virtual memory.    The
  3163.                  "Size of  paging/file partition"  is  the size  of  the
  3164.                  virtual memory portion of available memory.
  3165.  
  3166.             NOTES:
  3167.                  None.
  3168.  
  3169.             SHORTCUT:
  3170.                  None.
  3171.  
  3172.             SEE ALSO:
  3173.                  MEMORY
  3174.  
  3175.  
  3176.  
  3177.  
  3178.  
  3179.  
  3180.  
  3181.  
  3182.  
  3183.  
  3184.  
  3185.  
  3186.  
  3187.  
  3188.  
  3189.  
  3190.  
  3191.  
  3192.  
  3193.  
  3194.  
  3195.  
  3196.  
  3197.  
  3198.  
  3199.  
  3200.  
  3201.  
  3202.                                        Page 51
  3203.  
  3204.  
  3205.  
  3206.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3207.  
  3208.  
  3209.  
  3210.             COMMAND:
  3211.                  MERGE
  3212.  
  3213.             PURPOSE:
  3214.                  Merges three color separated images into one full color
  3215.                  image.
  3216.  
  3217.             SYNTAX:
  3218.                  MERGE <redfile> <bluefile> <greenfile> [outbuf]
  3219.  
  3220.             DESCRIPTION:
  3221.                  MERGE performs three  LOADs; one LOAD  for each of  the
  3222.                  different   files   in   <redfile>,   <bluefile>    and
  3223.                  <greenfile> with the exception that MERGE gets the  red
  3224.                  element of the image  from <redfile>, the blue  element
  3225.                  from <bluefile> and the green element from <greenfile>.
  3226.                  These are then  merged into a  single image and  placed
  3227.                  into [outbuf].
  3228.  
  3229.                  This is  useful for  people  who have  monochrome  hand
  3230.                  scanners.  It is possible to actually digitize a  color
  3231.                  image with a  monochrome hand scanner.   Scan an  image
  3232.                  three times using a red filter the first time, a  green
  3233.                  filter the  second time,  and a  blue filter  the  last
  3234.                  time.  Use  your hand scanner's  software to align  the
  3235.                  three images,  and import  them into  CImage using  the
  3236.                  MERGE command.  What you will get is a full-color image
  3237.                  in [outbuf].
  3238.  
  3239.             NOTES:
  3240.                  If [outbuf] is  not given, then  MERGE will create  the
  3241.                  first available buffer.
  3242.  
  3243.                  The three files in MERGE  may be different file  types,
  3244.                  however, they must all have the same resolution.
  3245.  
  3246.             SHORTCUT:
  3247.                  None.
  3248.  
  3249.             SEE ALSO:
  3250.                  LOAD SAVE LB OVERLAY
  3251.  
  3252.  
  3253.  
  3254.  
  3255.  
  3256.  
  3257.  
  3258.  
  3259.  
  3260.  
  3261.  
  3262.  
  3263.  
  3264.  
  3265.                                        Page 52
  3266.  
  3267.  
  3268.  
  3269.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3270.  
  3271.  
  3272.  
  3273.             COMMAND:
  3274.                  MULTIPLY
  3275.  
  3276.             PURPOSE:
  3277.                  Multiply the contents of two image buffers.
  3278.  
  3279.             SYNTAX:
  3280.                  MULTIPLY <buf1> <buf2> [outbuf]
  3281.  
  3282.             DESCRIPTION:
  3283.                  MULTIPLY will multiply, pixel by pixel each of the red,
  3284.                  blue and  green components  of  <buf1> and  <buf2>  and
  3285.                  place the result into [outbuf].
  3286.  
  3287.             NOTES:
  3288.                  If [outbuf]  is not  given,  then <buf1>  contains  the
  3289.                  result.
  3290.  
  3291.                  Upon multiplying the components, if the two  components
  3292.                  multiplied are  greater than  255, then  the  component
  3293.                  value is clipped to 255.
  3294.  
  3295.             SHORTCUT:
  3296.                  MULT
  3297.  
  3298.             SEE ALSO:
  3299.                  ADD SUBTRACT DIVIDE
  3300.  
  3301.  
  3302.  
  3303.  
  3304.  
  3305.  
  3306.  
  3307.  
  3308.  
  3309.  
  3310.  
  3311.  
  3312.  
  3313.  
  3314.  
  3315.  
  3316.  
  3317.  
  3318.  
  3319.  
  3320.  
  3321.  
  3322.  
  3323.  
  3324.  
  3325.  
  3326.  
  3327.  
  3328.                                        Page 53
  3329.  
  3330.  
  3331.  
  3332.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3333.  
  3334.  
  3335.  
  3336.             COMMAND:
  3337.                  NEGATE
  3338.  
  3339.             PURPOSE:
  3340.                  Create a photo negative of an image.
  3341.  
  3342.             SYNTAX:
  3343.                  NEGATE <inbuf> [outbuf]
  3344.  
  3345.             DESCRIPTION:
  3346.                  Negate reads the value of  each color element for  each
  3347.                  pixel,  and  subtracts  it  from  255.    Placing   the
  3348.                  resulting image into [outbuf].
  3349.  
  3350.                  The  effect  is  an   intensity  reversal  (or   "photo
  3351.                  negative"), in  which black  becomes white,  and  white
  3352.                  becomes black.
  3353.  
  3354.             NOTES:
  3355.                  If [outbuf]  is not  given, then  <inbuf> contains  the
  3356.                  result.
  3357.  
  3358.             SHORTCUT:
  3359.                  NEG
  3360.  
  3361.             SEE ALSO:
  3362.                  None.
  3363.  
  3364.  
  3365.  
  3366.  
  3367.  
  3368.  
  3369.  
  3370.  
  3371.  
  3372.  
  3373.  
  3374.  
  3375.  
  3376.  
  3377.  
  3378.  
  3379.  
  3380.  
  3381.  
  3382.  
  3383.  
  3384.  
  3385.  
  3386.  
  3387.  
  3388.  
  3389.  
  3390.  
  3391.                                        Page 54
  3392.  
  3393.  
  3394.  
  3395.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3396.  
  3397.  
  3398.  
  3399.             COMMAND:
  3400.                  NOISE
  3401.  
  3402.             PURPOSE:
  3403.                  Add random noise to an image.
  3404.  
  3405.             SYNTAX:
  3406.                  NOISE <amount> <inbuf> [outbuf]
  3407.  
  3408.             DESCRIPTION:
  3409.                  Computer generated images often  look to "perfect"  and
  3410.                  therefore, unrealistic.  NOISE can be used to help this
  3411.                  matter.
  3412.  
  3413.                  NOISE will randomly add  n <amount> to each  individual
  3414.                  pixel in <inbuf>, and place the result into [outbuf].
  3415.  
  3416.                  A useful value for <amount> would be 5-15.
  3417.  
  3418.             NOTES:
  3419.                  Valid range for <amount> is 1-255.
  3420.  
  3421.                  If [outbuf]  is not  given, then  <inbuf> contains  the
  3422.                  result.
  3423.  
  3424.                  If the addition  or subtraction of  <amount> takes  the
  3425.                  result above 255 or below 0, then the value is  clipped
  3426.                  to 0 or 255, respectively.
  3427.  
  3428.             SHORTCUT:
  3429.                  NOIS
  3430.  
  3431.             SEE ALSO:
  3432.                  None.
  3433.  
  3434.  
  3435.  
  3436.  
  3437.  
  3438.  
  3439.  
  3440.  
  3441.  
  3442.  
  3443.  
  3444.  
  3445.  
  3446.  
  3447.  
  3448.  
  3449.  
  3450.  
  3451.  
  3452.  
  3453.  
  3454.                                        Page 55
  3455.  
  3456.  
  3457.  
  3458.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3459.  
  3460.  
  3461.  
  3462.             COMMAND:
  3463.                  NORMALIZE
  3464.  
  3465.             PURPOSE:
  3466.                  Perform a histogram normalization on an image.
  3467.  
  3468.             SYNTAX:
  3469.                  NORMALIZE <inbuf> [outbuf]
  3470.  
  3471.             DESCRIPTION:
  3472.                  NORMALIZE  performs  a   histogram  normalization   (or
  3473.                  contrast enhancement) on <inbuf>.
  3474.  
  3475.                  A histogram normalization  is quite a  simple task.   A
  3476.                  normalization finds the darkest  color, and maps it  to
  3477.                  zero, then it finds the brightest color and maps it  to
  3478.                  white.  This is useful  for adding contrast to  images,
  3479.                  like very hazy images.  Normalization can actually turn
  3480.                  a "foggy" picture into a "sunny day" picture.
  3481.  
  3482.             NOTES:
  3483.                  If [outbuf]  is not  given, then  <inbuf> contains  the
  3484.                  result.
  3485.  
  3486.             SHORTCUT:
  3487.                  NORM
  3488.  
  3489.             SEE ALSO:
  3490.                  None.
  3491.  
  3492.  
  3493.  
  3494.  
  3495.  
  3496.  
  3497.  
  3498.  
  3499.  
  3500.  
  3501.  
  3502.  
  3503.  
  3504.  
  3505.  
  3506.  
  3507.  
  3508.  
  3509.  
  3510.  
  3511.  
  3512.  
  3513.  
  3514.  
  3515.  
  3516.  
  3517.                                        Page 56
  3518.  
  3519.  
  3520.  
  3521.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3522.  
  3523.  
  3524.  
  3525.             COMMAND:
  3526.                  OVERLAY
  3527.  
  3528.             PURPOSE:
  3529.                  Performs a color selectable  overlay of one image  onto
  3530.                  another image.
  3531.  
  3532.             SYNTAX:
  3533.                  OVERLAY <buf1> <buf2> <low> <high> [outbuf]
  3534.  
  3535.             DESCRIPTION:
  3536.                  OVERLAY will  overlay each  pixel from  <buf1> that  is
  3537.                  greater than or equal to <low>  and less than or  equal
  3538.                  to <high> onto it's corresponding pixel in <buf2>.  The
  3539.                  resulting image is then placed into [outbuf].
  3540.  
  3541.                  The comparison of  <low> and <high>  against pixels  in
  3542.                  <buf1> are done on after monochrome conversion.  CImage
  3543.                  first converts <buf1> to mono to compare against  <low>
  3544.                  and <high> and  if the monochrome  value is inside  the
  3545.                  range, then the COLOR value is placed into [outbuf].
  3546.  
  3547.                  OVERLAY  is  useful  for  overlaying  an  image  of  an
  3548.                  airplane (with  a  black background)  onto  a  mountain
  3549.                  scene.
  3550.  
  3551.             NOTES:
  3552.                  The valid range for <low> and <high> is 0-255.
  3553.  
  3554.                  If [outbuf] is not given, then OVERLAY will create  the
  3555.                  first available buffer.
  3556.  
  3557.                  The "Loaded as file name" is set to OVERLAY.TGA
  3558.  
  3559.             SHORTCUT:
  3560.                  OVER
  3561.  
  3562.             SEE ALSO:
  3563.                  MERGE
  3564.  
  3565.  
  3566.  
  3567.  
  3568.  
  3569.  
  3570.  
  3571.  
  3572.  
  3573.  
  3574.  
  3575.  
  3576.  
  3577.  
  3578.  
  3579.  
  3580.                                        Page 57
  3581.  
  3582.  
  3583.  
  3584.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3585.  
  3586.  
  3587.  
  3588.             COMMAND:
  3589.                  PAUSE
  3590.  
  3591.             PURPOSE:
  3592.                  PAUSE suspends the operation of a CImage Batch file.
  3593.  
  3594.             SYNTAX:
  3595.                  PAUSE <string>
  3596.                -or-
  3597.                  PAUSE
  3598.  
  3599.             DESCRIPTION:
  3600.                  If  <string>   exists,   then  <string>   is   printed,
  3601.                  otherwise,  PAUSE  will  display  "Press  any  key   to
  3602.                  continue...".  PAUSE will then wait for a key-press  to
  3603.                  continue.
  3604.  
  3605.             NOTES:
  3606.                  PAUSE is  often used  to break  out of  batch files  by
  3607.                  allowing the user  to press the  break key [CTRL-C]  or
  3608.                  [CTRL-BREAK].   If the  break key  sequence is  pressed
  3609.                  during a PAUSE  command, CImage will  not ask to  break
  3610.                  out of the batch file until  a key is pressed. This  is
  3611.                  the only  point in  batch file  processing when  CImage
  3612.                  will wait for a key to ask to stop processing the batch
  3613.                  file.
  3614.  
  3615.                  Currently, PAUSE echoes all text as upper-case only.
  3616.  
  3617.             SHORTCUT:
  3618.                  None.
  3619.  
  3620.             SEE ALSO:
  3621.                  BATCH ASK IF GOTO : REM PAUSE ECHO
  3622.  
  3623.  
  3624.  
  3625.  
  3626.  
  3627.  
  3628.  
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634.  
  3635.  
  3636.  
  3637.  
  3638.  
  3639.  
  3640.  
  3641.  
  3642.  
  3643.                                        Page 58
  3644.  
  3645.  
  3646.  
  3647.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3648.  
  3649.  
  3650.  
  3651.             COMMAND:
  3652.                  PERCENT
  3653.  
  3654.             PURPOSE:
  3655.                  PERCENT is used to enable/disable the percentages  that
  3656.                  are printed as CImage processes different commands that
  3657.                  may take some time.
  3658.  
  3659.             SYNTAX:
  3660.                  PERCENT ON
  3661.                -or-
  3662.                  PERCENT OFF
  3663.  
  3664.             DESCRIPTION:
  3665.                  PERCENT ON will enable the percentages, and PERCENT OFF
  3666.                  will turn them off.  The default is ON.
  3667.  
  3668.                  Turning the  percents off  will speed  up the  time  it
  3669.                  takes to  execute commands.    This is  because  screen
  3670.                  displays are rather slow.
  3671.  
  3672.             NOTES:
  3673.                  The ONLY command that takes  some time to process  that
  3674.                  does not display percents is the PLASMA command.
  3675.  
  3676.             SHORTCUT:
  3677.                  None.
  3678.  
  3679.             SEE ALSO:
  3680.                  None.
  3681.  
  3682.  
  3683.  
  3684.  
  3685.  
  3686.  
  3687.  
  3688.  
  3689.  
  3690.  
  3691.  
  3692.  
  3693.  
  3694.  
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.  
  3701.  
  3702.  
  3703.  
  3704.  
  3705.  
  3706.                                        Page 59
  3707.  
  3708.  
  3709.  
  3710.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3711.  
  3712.  
  3713.  
  3714.             COMMAND:
  3715.                  PIX
  3716.  
  3717.             PURPOSE:
  3718.                  Pixellize an image.
  3719.  
  3720.             SYNTAX:
  3721.                  PIX <xres> <yres> <inbuf> [outbuf]
  3722.  
  3723.             DESCRIPTION:
  3724.                  PIX will group pixels of <xres> by <yres>, average  all
  3725.                  the pixel values in the group, and replace those pixels
  3726.                  with the averaged  color.  The  result of  which is  an
  3727.                  image that appears  as though the  resolution has  been
  3728.                  lowered and the pixels stretched to keep the same image
  3729.                  size.
  3730.  
  3731.                  PIX does NOT alter the image  resolution.  An image  of
  3732.                  100x100 being  pixelized  with  the values  of  5  (for
  3733.                  <xres>) and 5 (for <yres>) will generate an image  that
  3734.                  appears to  have a  resolution of  20x20, however,  the
  3735.                  resolution is actually 100x100.
  3736.  
  3737.             NOTES:
  3738.                  If [outbuf]  is not  given, then  <inbuf> contains  the
  3739.                  result.
  3740.  
  3741.             SHORTCUT:
  3742.                  None.
  3743.  
  3744.             SEE ALSO:
  3745.                  None.
  3746.  
  3747.  
  3748.  
  3749.  
  3750.  
  3751.  
  3752.  
  3753.  
  3754.  
  3755.  
  3756.  
  3757.  
  3758.  
  3759.  
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.  
  3767.  
  3768.  
  3769.                                        Page 60
  3770.  
  3771.  
  3772.  
  3773.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3774.  
  3775.  
  3776.  
  3777.             COMMAND:
  3778.                  PLASMA
  3779.  
  3780.             PURPOSE:
  3781.                  Creates a "plasma" type fractal image.
  3782.  
  3783.             SYNTAX:
  3784.                  PLASMA <xres> <yres> <grain> [outbuf]
  3785.  
  3786.             DESCRIPTION:
  3787.                  PLASMA will create a  "plasma" fractal image of  <xres>
  3788.                  by <yres>  using  <grain>  and place  the  result  into
  3789.                  [outbuf].
  3790.  
  3791.                  Plasma fractals look like  clouds.  The larger  <grain>
  3792.                  is, the denser the clouds.  A typical value for  plasma
  3793.                  is 3.
  3794.  
  3795.             NOTES:
  3796.                  Valid range for <grain> is 0.001 - 100.0.
  3797.  
  3798.                  If [outbuf] is not given,  then PLASMA will create  the
  3799.                  first available buffer.
  3800.  
  3801.                  PLASMA is  the  only  command  that  does  not  display
  3802.                  percentages as it executes.
  3803.  
  3804.                  The "Loaded as file name" is set to PLASMA.TGA
  3805.  
  3806.             SHORTCUT:
  3807.                  None.
  3808.  
  3809.             SEE ALSO:
  3810.                  None.
  3811.  
  3812.  
  3813.  
  3814.  
  3815.  
  3816.  
  3817.  
  3818.  
  3819.  
  3820.  
  3821.  
  3822.  
  3823.  
  3824.  
  3825.  
  3826.  
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832.                                        Page 61
  3833.  
  3834.  
  3835.  
  3836.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3837.  
  3838.  
  3839.  
  3840.             COMMAND:
  3841.                  PMOD
  3842.  
  3843.             PURPOSE:
  3844.                  Sets the prompt modifier.
  3845.  
  3846.             SYNTAX:
  3847.                  PMOD [modifier]
  3848.  
  3849.             DESCRIPTION:
  3850.                  The prompt modifier  is displayed  to the  left of  the
  3851.                  prompt so  that  the  user  can  tell  when  CImage  is
  3852.                  running.  PMOD will allow the user to change the prompt
  3853.                  modifier.
  3854.  
  3855.             NOTES:
  3856.                  If [modifier] is not given, then PMOD will display  the
  3857.                  current prompt modifier.
  3858.  
  3859.             SHORTCUT:
  3860.                  None.
  3861.  
  3862.             SEE ALSO:
  3863.                  None.
  3864.  
  3865.  
  3866.  
  3867.  
  3868.  
  3869.  
  3870.  
  3871.  
  3872.  
  3873.  
  3874.  
  3875.  
  3876.  
  3877.  
  3878.  
  3879.  
  3880.  
  3881.  
  3882.  
  3883.  
  3884.  
  3885.  
  3886.  
  3887.  
  3888.  
  3889.  
  3890.  
  3891.  
  3892.  
  3893.  
  3894.  
  3895.                                        Page 62
  3896.  
  3897.  
  3898.  
  3899.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3900.  
  3901.  
  3902.  
  3903.             COMMAND:
  3904.                  REM
  3905.  
  3906.             PURPOSE:
  3907.                  During the  execution  of  an CImage  batch  file,  REM
  3908.                  displays the remarks that are on  the same line as  the
  3909.                  REM command in that batch file.
  3910.  
  3911.             SYNTAX:
  3912.                  REM [comment]
  3913.  
  3914.             DESCRIPTION:
  3915.                  The [comment] is  not executed, rather  it is used  for
  3916.                  making notes inside batch files to it readers from it's
  3917.                  author.  It can also be used to display information  to
  3918.                  the screen as a batch file executes.
  3919.  
  3920.             NOTES:
  3921.                  If the ECHO is  off, then the REM  command line is  not
  3922.                  displayed.
  3923.  
  3924.             SHORTCUT:
  3925.                  None.
  3926.  
  3927.             SEE ALSO:
  3928.                  BATCH ASK IF GOTO : PAUSE ECHO
  3929.  
  3930.  
  3931.  
  3932.  
  3933.  
  3934.  
  3935.  
  3936.  
  3937.  
  3938.  
  3939.  
  3940.  
  3941.  
  3942.  
  3943.  
  3944.  
  3945.  
  3946.  
  3947.  
  3948.  
  3949.  
  3950.  
  3951.  
  3952.  
  3953.  
  3954.  
  3955.  
  3956.  
  3957.  
  3958.                                        Page 63
  3959.  
  3960.  
  3961.  
  3962.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  3963.  
  3964.  
  3965.  
  3966.             COMMAND:
  3967.                  SAVE
  3968.  
  3969.             PURPOSE:
  3970.                  Save an image buffer.
  3971.  
  3972.             SYNTAX:
  3973.                  SAVE <buff> [filename]
  3974.  
  3975.             DESCRIPTION:
  3976.                  SAVE will save <buff> to [filename].
  3977.  
  3978.             NOTES:
  3979.                  If [filename] is not given, then SAVE will get the name
  3980.                  from the last saved  name for that  buffer (see the  LC
  3981.                  command for more  information on looking  for the  last
  3982.                  saved name).  If there is no last saved name, then SAVE
  3983.                  will save  the  buffer  under  the  name  that  it  was
  3984.                  originally loaded (or created).
  3985.  
  3986.                  Files are overwritten without verification.
  3987.  
  3988.                  The file's extension is used to decide the file's type.
  3989.                  Once the file type is obtained from the extension, SAVE
  3990.                  will create the file, and save it accordingly.
  3991.  
  3992.                  Current supported file types are:
  3993.                    IMG - VIVID/BOB format
  3994.                    GIF - GIF87a
  3995.                    TGA - Only type 2, uncompressed
  3996.                    BMP - All versions (Windows)
  3997.                    IPI - CImage's internal format (See HELP IPI for
  3998.                          details on format)
  3999.  
  4000.                  Also note that all files written out by CImage are  24-
  4001.                  bit, non-compressed  images (except  .GIF files,  which
  4002.                  are 8-bit compressed  images), and  Targa files  (.TGA)
  4003.                  are written in Top-down format only.
  4004.  
  4005.             SHORTCUT:
  4006.                  None.
  4007.  
  4008.             SEE ALSO:
  4009.                  LOAD MERGE LB
  4010.  
  4011.  
  4012.  
  4013.  
  4014.  
  4015.  
  4016.  
  4017.  
  4018.  
  4019.  
  4020.  
  4021.                                        Page 64
  4022.  
  4023.  
  4024.  
  4025.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  4026.  
  4027.  
  4028.  
  4029.             COMMAND:
  4030.                  SET
  4031.  
  4032.             PURPOSE:
  4033.                  Set an CImage internal environment variable.
  4034.  
  4035.             SYNTAX:
  4036.                  SET [var] [value]
  4037.  
  4038.             DESCRIPTION:
  4039.                  SET  will  define   the  CImage  internal   environment
  4040.                  variable [var] to  be [value].   Environment  variables
  4041.                  are similar  to  macros  except  that  macros  must  be
  4042.                  separated from other  words on  the command  line by  a
  4043.                  space,  and  environment   variables  don't,   however,
  4044.                  environment variables require a '%' sign on either side
  4045.                  of them for them to be resolved properly.
  4046.  
  4047.                  Environment variables  are  usually  used  as  settings
  4048.                  (like the  path to  your images)  to be  inserted  into
  4049.                  command line.  You  can define almost  any string to  a
  4050.                  variable.  These environment  variable are accessed  as
  4051.                  %<var>%.
  4052.  
  4053.                  If you define  "PTH" to be  "C:\IMAGES\".  Then,  every
  4054.                  time you type "%PTH%" on the command line, CImage  will
  4055.                  interpret it as: "C:\IMAGES\"
  4056.  
  4057.                  Say you type the line:  "LOAD %PTH%PICTURE.GIF".   This
  4058.                  line     will     get     interpreted     as      "LOAD
  4059.                  C:\IMAGES\PICTURE.GIF".
  4060.  
  4061.                  Like macros, environment  variables may also  reference
  4062.                  each other.
  4063.  
  4064.             NOTES:
  4065.                  Macros  may   reference  environment   variables,   but
  4066.                  environment variables may not reference macros.
  4067.  
  4068.                  If [value] is not given, then the [var] will be removed
  4069.                  from the environment variable table.
  4070.  
  4071.                  If [var] and [value] are not given, then SET will  list
  4072.                  all currently defined environment variables.
  4073.  
  4074.             SHORTCUT:
  4075.                  None.
  4076.  
  4077.             SEE ALSO:
  4078.                  MACRO
  4079.  
  4080.  
  4081.  
  4082.  
  4083.  
  4084.                                        Page 65
  4085.  
  4086.  
  4087.  
  4088.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  4089.  
  4090.  
  4091.  
  4092.             COMMAND:
  4093.                  SHOW
  4094.  
  4095.             PURPOSE:
  4096.                  Display an image buffer.
  4097.  
  4098.             SYNTAX:
  4099.                  SHOW [buf]
  4100.  
  4101.             DESCRIPTION:
  4102.                  SHOW will  display,  in  graphics mode,  the  image  in
  4103.                  [buf].
  4104.  
  4105.                  If color reduction  is needed, then  SHOW will  perform
  4106.                  the color reduction before displaying the image.
  4107.  
  4108.                  SHOW will use  the information  in VMODE  to pick  what
  4109.                  type of display mode to enter  to show [buf].  See  the
  4110.                  VMODE command  for more  information on  the different
  4111.                  graphics configurations available from CImage.
  4112.  
  4113.                  Once the image  is displayed, SHOW  will beep, and  any
  4114.                  key will  return  the user  to  the text  mode  command
  4115.                  prompt.
  4116.  
  4117.             NOTES:
  4118.                  If [buf] is not  given, then SHOW  will show the  first
  4119.                  available buffer (if one exists).
  4120.  
  4121.                  The modes 11-13, 15 and 17 may take a few seconds  once
  4122.                  they enter graphics mode to begin displaying the  image
  4123.                  to finalize color co ordination.  This is  not true for
  4124.                  modes with 32K colors or more.
  4125.  
  4126.                  VESA is the preferred graphics configuration to run.
  4127.  
  4128.                  CImage does  not  support  modes  with  less  than  256
  4129.                  colors.
  4130.  
  4131.             SHORTCUT:
  4132.                  None.
  4133.  
  4134.             SEE ALSO:
  4135.                  VESAINFO BIOSINFO VMODE VCOLORS CRES
  4136.  
  4137.  
  4138.  
  4139.  
  4140.  
  4141.  
  4142.  
  4143.  
  4144.  
  4145.  
  4146.  
  4147.                                        Page 66
  4148.  
  4149.  
  4150.  
  4151.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  4152.  
  4153.  
  4154.  
  4155.             COMMAND:
  4156.                  SUBTRACT
  4157.  
  4158.             PURPOSE:
  4159.                  Subtract the contents of two image buffers.
  4160.  
  4161.             SYNTAX:
  4162.                  SUBTRACT <buf1> <buf2> [outbuf]
  4163.  
  4164.             DESCRIPTION:
  4165.                  SUBTRACT will  subtract, pixel  by pixel,  each of  the
  4166.                  red, blue and green components of <buf1> and <buf2> and
  4167.                  place the result into [outbuf].
  4168.  
  4169.             NOTES:
  4170.                  If [outbuf]  is not  given,  then <buf1>  contains  the
  4171.                  result.
  4172.  
  4173.                  Upon subtracting the components, if the two  components
  4174.                  subtracted are less than 0, then the component value is
  4175.                  clipped to 0.
  4176.  
  4177.             SHORTCUT:
  4178.                  SUB
  4179.  
  4180.             SEE ALSO:
  4181.                  ADD MULTIPLY DIVIDE
  4182.  
  4183.  
  4184.  
  4185.  
  4186.  
  4187.  
  4188.  
  4189.  
  4190.  
  4191.  
  4192.  
  4193.  
  4194.  
  4195.  
  4196.  
  4197.  
  4198.  
  4199.  
  4200.  
  4201.  
  4202.  
  4203.  
  4204.  
  4205.  
  4206.  
  4207.  
  4208.  
  4209.  
  4210.                                        Page 67
  4211.  
  4212.  
  4213.  
  4214.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  4215.  
  4216.  
  4217.  
  4218.             COMMAND:
  4219.                  TERRAIN
  4220.  
  4221.             PURPOSE:
  4222.                  Generate a BOB (ray tracer) compatible terrain map.
  4223.  
  4224.             SYNTAX:
  4225.                  TERRAIN <buff> <range> <filename> <low> [color]
  4226.  
  4227.             DESCRIPTION:
  4228.                  TERRAIN will generate a .B file for the ray tracer  BOB
  4229.                  that contains  a  terrain  map  of  triangles  for  the
  4230.                  current image using the intensity of each pixel for the
  4231.                  height of the triangle points.
  4232.  
  4233.                  TERRAIN scans  <buff>,  and  at each  pixel  it  scales
  4234.                  [color] to <range>, then  compares the value to  <low>,
  4235.                  which is the "water  level", and if  the value is  less
  4236.                  than <low>,  the  value gets  clipped  to <low>.    The
  4237.                  triangle is then written to <filename>.
  4238.  
  4239.                  This command  was  meant  to work  primarily  with  the
  4240.                  PLASMA images for terrain  generation, however, it  can
  4241.                  be used with any image.
  4242.  
  4243.             NOTES:
  4244.                  <range> must be greater than 0.  Valid range for  <low>
  4245.                  is 0 (flat)  to 255 (full  height).   Valid values  for
  4246.                  [color] are R, G, B or M. These specify to use the  Red
  4247.                  element, Blue  element,  Green  element  or  the  pixel
  4248.                  converted to Monochrome for  the pixel value  (triangle
  4249.                  height).
  4250.  
  4251.                  If  [color]  is  not  given,  then  TERRAIN  will   use
  4252.                  Monochrome conversion.
  4253.  
  4254.                  Images of 640x480 can create VERY LARGE output files.
  4255.  
  4256.             SHORTCUT:
  4257.                  TERR
  4258.  
  4259.             SEE ALSO:
  4260.                  None.
  4261.  
  4262.  
  4263.  
  4264.  
  4265.  
  4266.  
  4267.  
  4268.  
  4269.  
  4270.  
  4271.  
  4272.  
  4273.                                        Page 68
  4274.  
  4275.  
  4276.  
  4277.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  4278.  
  4279.  
  4280.  
  4281.             COMMAND:
  4282.                  VCOLORS
  4283.  
  4284.             PURPOSE:
  4285.                  Set the  number  of  colors that  the  video  card  can
  4286.                  display.
  4287.  
  4288.             SYNTAX:
  4289.                  VCOLORS [val]
  4290.  
  4291.             DESCRIPTION:
  4292.                  VCOLORS tells CImage how many colors the video card can
  4293.                  display simultaneously.  CImage needs to know how many
  4294.                  colors the  video  card  can display  so  that  it  may
  4295.                  properly reduce  the internal  24-bit images  to  [val]
  4296.                  colors for displaying.
  4297.  
  4298.                  This value is set by the VESAINFO, VMODE, and  BIOSINFO
  4299.                  functions.
  4300.  
  4301.             NOTES:
  4302.                  If [val] is  not given, then  VCOLORS will display  the
  4303.                  current setting.
  4304.  
  4305.                  CImage does  not  support  modes  with  less  than  256
  4306.                  colors.
  4307.  
  4308.             SHORTCUT:
  4309.                  None.
  4310.  
  4311.             SEE ALSO:
  4312.                  VESAINFO BIOSINFO VMODE CRES SHOW
  4313.  
  4314.  
  4315.  
  4316.  
  4317.  
  4318.  
  4319.  
  4320.  
  4321.  
  4322.  
  4323.  
  4324.  
  4325.  
  4326.  
  4327.  
  4328.  
  4329.  
  4330.  
  4331.  
  4332.  
  4333.  
  4334.  
  4335.  
  4336.                                        Page 69
  4337.  
  4338.  
  4339.  
  4340.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  4341.  
  4342.  
  4343.  
  4344.             COMMAND:
  4345.                  VESAINFO
  4346.  
  4347.             PURPOSE:
  4348.                  Set or display the VESA graphics configuration.
  4349.  
  4350.             SYNTAX:
  4351.                  VESAINFO [mode]
  4352.  
  4353.             DESCRIPTION:
  4354.                  VESAINFO will set the current VESA configuration to  be
  4355.                  used  for  displaying  image  buffers  using  the  SHOW
  4356.                  command.
  4357.  
  4358.                  Users must also  perform a "VMODE  VESA" to enable  the
  4359.                  VESA mode for displaying image buffers.  See the  VMODE
  4360.                  command for more information on setting the mode.
  4361.  
  4362.                  VESA  is  a  great  standard  for  super-VGA  displays.
  4363.                  CImage's developers  support VESA  and hopes  that  you
  4364.                  will use this  configuration above BIOS  or any of  the
  4365.                  built-in modes.
  4366.  
  4367.             NOTES:
  4368.                  The VESA drivers are not  included with CImage.   These
  4369.                  drivers  can   be   obtained  from   you   video   card
  4370.                  manufacturer if they were  not included with your  card
  4371.                  upon purchase.
  4372.  
  4373.                  If [mode] is not given, then VESAINFO will display  the
  4374.                  following information  (this is  from my  system,  VESA
  4375.                  version 1.2 running a Diamond Speed Star 24X):
  4376.  
  4377.                       Available modes are marked with an asterisk (*):
  4378.                             6Ah -  800 x  600  16 colors
  4379.                          * 100h -  640 x  400 256 colors
  4380.                          * 101h -  640 x  480 256 colors
  4381.                          * 102h -  800 x  600  16 colors
  4382.                          * 103h -  800 x  600 256 colors
  4383.                          * 104h - 1024 x  768  16 colors
  4384.                          * 105h - 1024 x  768 256 colors
  4385.                          * 106h - 1280 x 1024  16 colors
  4386.                            107h - 1280 x 1024 256 colors
  4387.                            108h - TEXT MODE...unusable
  4388.                          * 109h - TEXT MODE...unusable
  4389.                          * 10Ah - TEXT MODE...unusable
  4390.                          * 10Bh - TEXT MODE...unusable
  4391.                            10Ch - TEXT MODE...unusable
  4392.                          * 10Dh -  320 x  200 32K colors
  4393.                            10Eh -  320 x  200 64K colors
  4394.                            10Fh -  320 x  200 16M colors
  4395.                          * 110h -  640 x  480 32K colors
  4396.                            111h -  640 x  480 64K colors
  4397.  
  4398.  
  4399.                                        Page 70
  4400.  
  4401.  
  4402.  
  4403.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  4404.  
  4405.  
  4406.                            112h -  640 x  480 16M colors
  4407.                          * 113h -  800 x  600 32K colors
  4408.                            114h -  800 x  600 64K colors
  4409.                            115h -  800 x  600 16M colors
  4410.                            116h - 1024 x  768 32K colors
  4411.                            117h - 1024 x  768 64K colors
  4412.                            118h - 1024 x  768 16M colors
  4413.                            119h - 1280 x 1024 32K colors
  4414.                            11Ah - 1280 x 1024 64K colors
  4415.                            11Bh - 1280 x 1024 16M colors
  4416.  
  4417.                       Current Settings:
  4418.  
  4419.                                VESA version:  1.2
  4420.                                    OEM name:  Western Digital Inc V1.2
  4421.                             VESA video mode:  113h (275)
  4422.                                  Resolution:  800x600
  4423.                          Displayable colors:  32768 (15 Bits per pixel)
  4424.                             Mode attributes:  [Supported] [No BIOS
  4425.                                                Output] [Color]
  4426.                                                [Graphics]
  4427.                         Window A attributes:  [Supported] [Readable]
  4428.                                                [Writable]
  4429.                         Window B attributes:  [Not Supported]
  4430.                        Granularity/Win size:  4K/64K
  4431.                         Window segments A/B:  A000h/A800h
  4432.                        Window pos. function:  0623:05EEh
  4433.                          Bytes per scanline:  1600
  4434.                              Character size:  0x0
  4435.                          # of memory planes:  1
  4436.                             Number of banks:  1
  4437.                           Memory model type:  YUV
  4438.                                   Bank size:  0K
  4439.                                 Image pages:  1
  4440.                          Red size/field pos:  5/10
  4441.                        Green size/field pos:  5/5
  4442.                         Blue size/field pos:  5/0
  4443.                           Direct color mode:  [Color ramp fixed] [Bits
  4444.                                                are usable]
  4445.  
  4446.                  VESA is the preferred graphics configuration to run.
  4447.  
  4448.                  CImage does  not  support  modes  with  less  than  256
  4449.                  colors.
  4450.  
  4451.             SHORTCUT:
  4452.                  VESA
  4453.  
  4454.             SEE ALSO:
  4455.                  BIOSINFO VMODE VCOLORS CRES SHOW
  4456.  
  4457.  
  4458.  
  4459.  
  4460.  
  4461.  
  4462.                                        Page 71
  4463.  
  4464.  
  4465.  
  4466.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  4467.  
  4468.  
  4469.  
  4470.             COMMAND:
  4471.                  VMODE
  4472.  
  4473.             PURPOSE:
  4474.                  Sets the video  mode to  be used  for displaying  image
  4475.                  buffers.
  4476.  
  4477.             SYNTAX:
  4478.                  VMODE [mode]
  4479.  
  4480.             DESCRIPTION:
  4481.                  VMODE tells  CImage what  mode  to use  for  displaying
  4482.                  image  buffers.  Currently,  the  following  modes  are
  4483.                  supported:
  4484.                      320 x 200, 256 color
  4485.                      640 x 400, 256 color
  4486.                      640 x 480, 256 color
  4487.                      800 x 600, 256 color
  4488.                     1024 x 768, 256 color
  4489.                     BIOS mode
  4490.                     VESA mode
  4491.  
  4492.                  If BIOS is selected, then CImage uses the current  BIOS
  4493.                  information for it's  display mode.   See the  BIOSINFO
  4494.                  command  for   more   information  on   BIOS   graphics
  4495.                  configuration.
  4496.  
  4497.                  If VESA is selected, then CImage uses the current  VESA
  4498.                  information for it's  display mode.   See the  VESAINFO
  4499.                  command  for   more   information  on   VESA   graphics
  4500.                  configuration.
  4501.  
  4502.             NOTES:
  4503.                  If [mode] is  not given,  then VMODE  will display  the
  4504.                  current mode's information, and the available modes.
  4505.  
  4506.                  Valid values for [val] are:
  4507.                     11.......320 x 200, 256 color
  4508.                     12.......640 x 400, 256 color
  4509.                     13.......640 x 480, 256 color
  4510.                     15.......800 x 600, 256 color
  4511.                     17......1024 x 768, 256 color
  4512.                     BIOS....BIOS mode
  4513.                     VESA....VESA mode
  4514.  
  4515.                  VESA is the preferred graphics configuration to run.
  4516.  
  4517.                  CImage does  not  support  modes  with  less  than  256
  4518.                  colors.
  4519.  
  4520.             SHORTCUT:
  4521.                  None.
  4522.  
  4523.  
  4524.  
  4525.                                        Page 72
  4526.  
  4527.  
  4528.  
  4529.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  4530.  
  4531.  
  4532.             SEE ALSO:
  4533.                  VESAINFO BIOSINFO VCOLORS CRES SHOW
  4534.  
  4535.  
  4536.  
  4537.  
  4538.  
  4539.  
  4540.  
  4541.  
  4542.  
  4543.  
  4544.  
  4545.  
  4546.  
  4547.  
  4548.  
  4549.  
  4550.  
  4551.  
  4552.  
  4553.  
  4554.  
  4555.  
  4556.  
  4557.  
  4558.  
  4559.  
  4560.  
  4561.  
  4562.  
  4563.  
  4564.  
  4565.  
  4566.  
  4567.  
  4568.  
  4569.  
  4570.  
  4571.  
  4572.  
  4573.  
  4574.  
  4575.  
  4576.  
  4577.  
  4578.  
  4579.  
  4580.  
  4581.  
  4582.  
  4583.  
  4584.  
  4585.  
  4586.  
  4587.  
  4588.                                        Page 73
  4589.  
  4590.  
  4591.  
  4592.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  4593.  
  4594.  
  4595.                                  FUTURE ENHANCEMENTS
  4596.  
  4597.             o    Add ERRORLEVEL to internal CImage commands where
  4598.                  needed.
  4599.  
  4600.             o    FOR command
  4601.  
  4602.             o    Image Functions:
  4603.                       Morphing (that's REAL MORPHING, not a fake)
  4604.                       Resize (interpolate)
  4605.                       Image combination (average of x number of images)
  4606.                       Rotate (on 90 degree boundaries)
  4607.  
  4608.             o    More Image Filters!
  4609.                       Sobel (strength & orientation)
  4610.                       Robert's edge (accurate & fast)
  4611.  
  4612.             o    Add other file formats:
  4613.                       Targa (versions of the Targa file that are not
  4614.                            currently supported)
  4615.                       TIFF
  4616.                       Other versions of GIF
  4617.  
  4618.  
  4619.  
  4620.  
  4621.  
  4622.  
  4623.  
  4624.  
  4625.  
  4626.  
  4627.  
  4628.  
  4629.  
  4630.  
  4631.  
  4632.  
  4633.  
  4634.  
  4635.  
  4636.  
  4637.  
  4638.  
  4639.  
  4640.  
  4641.  
  4642.  
  4643.  
  4644.  
  4645.  
  4646.  
  4647.  
  4648.  
  4649.  
  4650.  
  4651.                                        Page 74
  4652.  
  4653.  
  4654.  
  4655.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  4656.  
  4657.  
  4658.                              CONTACTING CUSTOMER SUPPORT
  4659.  
  4660.             I'm available in the evenings, I have the standard 9-5 job
  4661.             (eastern time).  If you need to reach me during the day, you
  4662.             can do so by calling and leaving a message.  I call in to my
  4663.             voice mail about three times per day, however, on hectic
  4664.             days, it's not so easy, and I may not get any messages at
  4665.             all.
  4666.  
  4667.             Tech Support is available for all registered users for one
  4668.             full year following the purchase.  For non-registered users
  4669.             (and registered users over one year), tech support is not
  4670.             officially available.  But if I'm not swamped, I'll try to
  4671.             get back to you.  Registered users over one year have
  4672.             priority over non-registered users.  So, please state your
  4673.             status.  It can be verified on computer.
  4674.  
  4675.             To contact me, just call (313) 941-9223.
  4676.  
  4677.             You may also mail your support questions to:
  4678.  
  4679.                  Paul D. Nettle
  4680.                  9668 Washington St.
  4681.                  Romulus, MI  48174
  4682.  
  4683.             My phone number and address are for support, comments,
  4684.             suggestions, questions, registration information, and of
  4685.             course, orders.
  4686.  
  4687.  
  4688.  
  4689.  
  4690.  
  4691.  
  4692.  
  4693.  
  4694.  
  4695.  
  4696.  
  4697.  
  4698.  
  4699.  
  4700.  
  4701.  
  4702.  
  4703.  
  4704.  
  4705.  
  4706.  
  4707.  
  4708.  
  4709.  
  4710.  
  4711.  
  4712.  
  4713.  
  4714.                                        Page 75
  4715.  
  4716.  
  4717.  
  4718.                 The Complete Image -- Copyright 1993, Paul D. Nettle
  4719.  
  4720.  
  4721.                                 ORDERING INFORMATION
  4722.  
  4723.  
  4724.             To order a copy of The Complete Image, just print out the
  4725.             REGISTR.FRM, fill it in, and send it with you check or money
  4726.             order for $35.00.
  4727.  
  4728.  
  4729.             What you will get when you register:
  4730.  
  4731.             o    The registered version of CImage on disk (your choice
  4732.                  of disk format -- 1.2M or 1.4M).
  4733.  
  4734.             o    A printed manual.
  4735.  
  4736.             o    The next update of CImage -- free of charge (Including
  4737.                  printed documentation).
  4738.  
  4739.             o    Peace of mind.
  4740.  
  4741.  
  4742.             Differences between non-registered and registered users:
  4743.  
  4744.             o    Registered versions don't display the registration
  4745.                  notice upon startup of CImage.
  4746.  
  4747.             o    Registered versions are marked with an "r" after the
  4748.                  version number in the title rather than a "u".
  4749.  
  4750.             o    Registered users are allowed free technical support
  4751.                  priority via phone or by mail.  Non-registered users
  4752.                  are given no official technical support.  (see
  4753.                  Contacting Customer Support).
  4754.  
  4755.  
  4756.  
  4757.  
  4758.  
  4759.  
  4760.  
  4761.  
  4762.  
  4763.  
  4764.  
  4765.  
  4766.  
  4767.  
  4768.  
  4769.  
  4770.  
  4771.  
  4772.  
  4773.  
  4774.  
  4775.  
  4776.  
  4777.                                        Page 76
  4778.  
  4779.